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.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_PinsrdImm
val va_codegen_success_PinsrdImm : dst:va_operand_xmm -> immediate:nat32 -> index:nat8 -> tmp:va_operand_reg_opr64 -> Tot va_pbool
val va_codegen_success_PinsrdImm : dst:va_operand_xmm -> immediate:nat32 -> index:nat8 -> tmp:va_operand_reg_opr64 -> Tot va_pbool
let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ())))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 26, "end_line": 771, "start_col": 0, "start_line": 768 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ()))))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "initial_ifuel": 0, "max_fuel": 4, "max_ifuel": 3, "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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> immediate: Vale.X64.Memory.nat32 -> index: Vale.X64.Memory.nat8 -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Memory.nat32", "Vale.X64.Memory.nat8", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsBasic.va_codegen_success_Mov64", "Vale.X64.Decls.va_coerce_reg_opr64_to_dst_opr64", "Vale.X64.Decls.va_const_opr64", "Vale.X64.InsVector.va_codegen_success_Pinsrd", "Vale.X64.Decls.va_coerce_reg_opr64_to_opr64", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_PinsrdImm dst immediate index tmp =
(va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ())))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_PinsrdImm
val va_code_PinsrdImm : dst:va_operand_xmm -> immediate:nat32 -> index:nat8 -> tmp:va_operand_reg_opr64 -> Tot va_code
val va_code_PinsrdImm : dst:va_operand_xmm -> immediate:nat32 -> index:nat8 -> tmp:va_operand_reg_opr64 -> Tot va_code
let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ()))))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 10, "end_line": 765, "start_col": 0, "start_line": 762 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "initial_ifuel": 0, "max_fuel": 4, "max_ifuel": 3, "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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> immediate: Vale.X64.Memory.nat32 -> index: Vale.X64.Memory.nat8 -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Memory.nat32", "Vale.X64.Memory.nat8", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.InsBasic.va_code_Mov64", "Vale.X64.Decls.va_coerce_reg_opr64_to_dst_opr64", "Vale.X64.Decls.va_const_opr64", "Vale.X64.InsVector.va_code_Pinsrd", "Vale.X64.Decls.va_coerce_reg_opr64_to_opr64", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_PinsrdImm dst immediate index tmp =
(va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) ) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ()))))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_Pcmpeqd
val va_wpProof_Pcmpeqd : dst:va_operand_xmm -> src:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Pcmpeqd dst src va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Pcmpeqd dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_Pcmpeqd : dst:va_operand_xmm -> src:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Pcmpeqd dst src va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Pcmpeqd dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 694, "start_col": 0, "start_line": 688 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "initial_ifuel": 0, "max_fuel": 4, "max_ifuel": 3, "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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> 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_operand_xmm", "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_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_Pcmpeqd", "Vale.X64.InsVector.va_code_Pcmpeqd" ]
[]
false
false
false
false
false
let va_wpProof_Pcmpeqd dst src va_s0 va_k =
let va_sM, va_f0 = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_Pinsrd
val va_wpProof_Pinsrd : dst:va_operand_xmm -> src:va_operand_opr64 -> index:nat8 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Pinsrd dst src index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Pinsrd dst src index) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_Pinsrd : dst:va_operand_xmm -> src:va_operand_opr64 -> index:nat8 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Pinsrd dst src index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Pinsrd dst src index) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 756, "start_col": 0, "start_line": 750 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "initial_ifuel": 0, "max_fuel": 4, "max_ifuel": 3, "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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_opr64 -> index: Vale.X64.Memory.nat8 -> 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_operand_xmm", "Vale.X64.Decls.va_operand_opr64", "Vale.X64.Memory.nat8", "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_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_Pinsrd", "Vale.X64.InsVector.va_code_Pinsrd" ]
[]
false
false
false
false
false
let va_wpProof_Pinsrd dst src index va_s0 va_k =
let va_sM, va_f0 = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_Vpsrldq8
val va_codegen_success_Vpsrldq8 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool
val va_codegen_success_Vpsrldq8 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool
let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ())
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 15, "end_line": 948, "start_col": 0, "start_line": 947 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src)))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_Vpsrldq8 dst src =
(va_ttrue ())
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_PinsrdImm
val va_lemma_PinsrdImm : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> immediate:nat32 -> index:nat8 -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_PinsrdImm dst immediate index tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ index < 4)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat32 (va_eval_xmm va_s0 dst) immediate index /\ va_eval_reg_opr64 va_sM tmp == immediate /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))))
val va_lemma_PinsrdImm : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> immediate:nat32 -> index:nat8 -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_PinsrdImm dst immediate index tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ index < 4)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat32 (va_eval_xmm va_s0 dst) immediate index /\ va_eval_reg_opr64 va_sM tmp == immediate /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))))
let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 787, "start_col": 0, "start_line": 774 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ())))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "initial_ifuel": 0, "max_fuel": 4, "max_ifuel": 3, "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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> immediate: Vale.X64.Memory.nat32 -> index: Vale.X64.Memory.nat8 -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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.Decls.va_operand_xmm", "Vale.X64.Memory.nat32", "Vale.X64.Memory.nat8", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_lemma_merge_total", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_lemma_empty_total", "Prims.list", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_tl", "Vale.X64.InsVector.va_lemma_Pinsrd", "Vale.X64.Decls.va_hd", "Vale.X64.Decls.va_coerce_reg_opr64_to_opr64", "Vale.X64.InsBasic.va_lemma_Mov64", "Vale.X64.Decls.va_coerce_reg_opr64_to_dst_opr64", "Vale.X64.Decls.va_const_opr64", "Vale.X64.Decls.va_get_block", "Prims.unit", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_PinsrdImm" ]
[]
false
false
false
false
false
let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp =
va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let va_old_s:va_state = va_s0 in let va_b1:va_codes = va_get_block va_b0 in let va_s2, va_fc2 = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let va_s3, va_fc3 = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let va_sM, va_f3 = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_PinsrdImm
val va_wpProof_PinsrdImm : dst:va_operand_xmm -> immediate:nat32 -> index:nat8 -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_PinsrdImm dst immediate index tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_PinsrdImm dst immediate index tmp) ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_PinsrdImm : dst:va_operand_xmm -> immediate:nat32 -> index:nat8 -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_PinsrdImm dst immediate index tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_PinsrdImm dst immediate index tmp) ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 799, "start_col": 0, "start_line": 791 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "initial_ifuel": 0, "max_fuel": 4, "max_ifuel": 3, "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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> immediate: Vale.X64.Memory.nat32 -> index: Vale.X64.Memory.nat8 -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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_operand_xmm", "Vale.X64.Memory.nat32", "Vale.X64.Memory.nat8", "Vale.X64.Decls.va_operand_reg_opr64", "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_reg_opr64", "Vale.X64.QuickCode.va_mod_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_reg_opr64", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_PinsrdImm", "Vale.X64.InsVector.va_code_PinsrdImm" ]
[]
false
false
false
false
false
let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k =
let va_sM, va_f0 = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_Mov128
val va_codegen_success_Mov128 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool
val va_codegen_success_Mov128 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool
let va_codegen_success_Mov128 dst src = (va_ttrue ())
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 15, "end_line": 978, "start_col": 0, "start_line": 977 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src)))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_Mov128 dst src =
(va_ttrue ())
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_Pinsrq
val va_code_Pinsrq : dst:va_operand_xmm -> src:va_operand_opr64 -> index:nat8 -> Tot va_code
val va_code_Pinsrq : dst:va_operand_xmm -> src:va_operand_opr64 -> index:nat8 -> Tot va_code
let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 59, "end_line": 807, "start_col": 0, "start_line": 806 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "max_ifuel": 3, "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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_opr64 -> index: Vale.X64.Memory.nat8 -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_opr64", "Vale.X64.Memory.nat8", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.inOut", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.op64", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Pinsrq", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_Pinsrq dst src index =
(mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_Pinsrd
val va_lemma_Pinsrd : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_opr64 -> index:nat8 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Pinsrd dst src index) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_opr64 src va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ va_eval_opr64 va_s0 src < pow2_32 /\ index < 4)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat32 (va_eval_xmm va_s0 dst) (va_eval_opr64 va_s0 src) index /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
val va_lemma_Pinsrd : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_opr64 -> index:nat8 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Pinsrd dst src index) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_opr64 src va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ va_eval_opr64 va_s0 src < pow2_32 /\ index < 4)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat32 (va_eval_xmm va_s0 dst) (va_eval_opr64 va_s0 src) index /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 746, "start_col": 0, "start_line": 740 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "initial_ifuel": 0, "max_fuel": 4, "max_ifuel": 3, "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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_opr64 -> index: Vale.X64.Memory.nat8 -> 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.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_opr64", "Vale.X64.Memory.nat8", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.inOut", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.op64", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Pinsrd", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Prims.unit", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_Pinsrd" ]
[]
false
false
false
false
false
let va_lemma_Pinsrd va_b0 va_s0 dst src index =
va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_Pinsrq
val va_wpProof_Pinsrq : dst:va_operand_xmm -> src:va_operand_opr64 -> index:nat8 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Pinsrq dst src index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Pinsrq dst src index) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_Pinsrq : dst:va_operand_xmm -> src:va_operand_opr64 -> index:nat8 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Pinsrq dst src index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Pinsrq dst src index) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 833, "start_col": 0, "start_line": 827 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "max_ifuel": 3, "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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_opr64 -> index: Vale.X64.Memory.nat8 -> 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_operand_xmm", "Vale.X64.Decls.va_operand_opr64", "Vale.X64.Memory.nat8", "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_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_Pinsrq", "Vale.X64.InsVector.va_code_Pinsrq" ]
[]
false
false
false
false
false
let va_wpProof_Pinsrq dst src index va_s0 va_k =
let va_sM, va_f0 = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_Pcmpeqd
val va_lemma_Pcmpeqd : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Pcmpeqd dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (if (Vale.Def.Words_s.__proj__Mkfour__item__lo0 (va_eval_xmm va_s0 src) = Vale.Def.Words_s.__proj__Mkfour__item__lo0 (va_eval_xmm va_s0 dst)) then 4294967295 else 0) (if (Vale.Def.Words_s.__proj__Mkfour__item__lo1 (va_eval_xmm va_s0 src) = Vale.Def.Words_s.__proj__Mkfour__item__lo1 (va_eval_xmm va_s0 dst)) then 4294967295 else 0) (if (Vale.Def.Words_s.__proj__Mkfour__item__hi2 (va_eval_xmm va_s0 src) = Vale.Def.Words_s.__proj__Mkfour__item__hi2 (va_eval_xmm va_s0 dst)) then 4294967295 else 0) (if (Vale.Def.Words_s.__proj__Mkfour__item__hi3 (va_eval_xmm va_s0 src) = Vale.Def.Words_s.__proj__Mkfour__item__hi3 (va_eval_xmm va_s0 dst)) then 4294967295 else 0) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
val va_lemma_Pcmpeqd : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Pcmpeqd dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (if (Vale.Def.Words_s.__proj__Mkfour__item__lo0 (va_eval_xmm va_s0 src) = Vale.Def.Words_s.__proj__Mkfour__item__lo0 (va_eval_xmm va_s0 dst)) then 4294967295 else 0) (if (Vale.Def.Words_s.__proj__Mkfour__item__lo1 (va_eval_xmm va_s0 src) = Vale.Def.Words_s.__proj__Mkfour__item__lo1 (va_eval_xmm va_s0 dst)) then 4294967295 else 0) (if (Vale.Def.Words_s.__proj__Mkfour__item__hi2 (va_eval_xmm va_s0 src) = Vale.Def.Words_s.__proj__Mkfour__item__hi2 (va_eval_xmm va_s0 dst)) then 4294967295 else 0) (if (Vale.Def.Words_s.__proj__Mkfour__item__hi3 (va_eval_xmm va_s0 src) = Vale.Def.Words_s.__proj__Mkfour__item__hi3 (va_eval_xmm va_s0 dst)) then 4294967295 else 0) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 684, "start_col": 0, "start_line": 678 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "initial_ifuel": 0, "max_fuel": 4, "max_ifuel": 3, "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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> 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.Decls.va_operand_xmm", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.inOut", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Pcmpeqd", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Prims.unit", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_Pcmpeqd" ]
[]
false
false
false
false
false
let va_lemma_Pcmpeqd va_b0 va_s0 dst src =
va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_Load128_buffer
val va_codegen_success_Load128_buffer : h:va_operand_heaplet -> dst:va_operand_xmm -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> Tot va_pbool
val va_codegen_success_Load128_buffer : h:va_operand_heaplet -> dst:va_operand_xmm -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> Tot va_pbool
let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ())
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 15, "end_line": 1008, "start_col": 0, "start_line": 1007 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t)))))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_Load128_buffer h dst src offset t =
(va_ttrue ())
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_Vpslldq8
val va_code_Vpslldq8 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code
val va_code_Vpslldq8 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code
let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src)))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 63, "end_line": 914, "start_col": 0, "start_line": 913 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_VPslldq", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_Vpslldq8 dst src =
(mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src)))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_LoadBe64_buffer128
val va_codegen_success_LoadBe64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> Tot va_pbool
val va_codegen_success_LoadBe64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> Tot va_pbool
let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ())
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 15, "end_line": 1042, "start_col": 0, "start_line": 1041 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t)))))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> upper: Prims.bool -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Prims.bool", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper =
(va_ttrue ())
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_Store128_buffer
val va_codegen_success_Store128_buffer : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_xmm -> offset:int -> t:taint -> Tot va_pbool
val va_codegen_success_Store128_buffer : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_xmm -> offset:int -> t:taint -> Tot va_pbool
let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ())
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 15, "end_line": 1080, "start_col": 0, "start_line": 1079 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src)))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_xmm -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_operand_xmm", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_Store128_buffer h dst src offset t =
(va_ttrue ())
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_VPslldq4
val va_code_VPslldq4 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code
val va_code_VPslldq4 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code
let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src)))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 63, "end_line": 884, "start_col": 0, "start_line": 883 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_VPslldq", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_VPslldq4 dst src =
(mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src)))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_PinsrqImm
val va_wpProof_PinsrqImm : dst:va_operand_xmm -> immediate:nat64 -> index:nat8 -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_PinsrqImm dst immediate index tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_PinsrqImm dst immediate index tmp) ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_PinsrqImm : dst:va_operand_xmm -> immediate:nat64 -> index:nat8 -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_PinsrqImm dst immediate index tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_PinsrqImm dst immediate index tmp) ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 876, "start_col": 0, "start_line": 868 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "max_ifuel": 3, "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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> immediate: Vale.X64.Memory.nat64 -> index: Vale.X64.Memory.nat8 -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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_operand_xmm", "Vale.X64.Memory.nat64", "Vale.X64.Memory.nat8", "Vale.X64.Decls.va_operand_reg_opr64", "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_reg_opr64", "Vale.X64.QuickCode.va_mod_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_reg_opr64", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_PinsrqImm", "Vale.X64.InsVector.va_code_PinsrqImm" ]
[]
false
false
false
false
false
let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k =
let va_sM, va_f0 = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_VPslldq4
val va_wpProof_VPslldq4 : dst:va_operand_xmm -> src:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_VPslldq4 dst src va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_VPslldq4 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_VPslldq4 : dst:va_operand_xmm -> src:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_VPslldq4 dst src va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_VPslldq4 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 907, "start_col": 0, "start_line": 901 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> 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_operand_xmm", "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_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_VPslldq4", "Vale.X64.InsVector.va_code_VPslldq4" ]
[]
false
false
false
false
false
let va_wpProof_VPslldq4 dst src va_s0 va_k =
let va_sM, va_f0 = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_PinsrqImm
val va_lemma_PinsrqImm : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> immediate:nat64 -> index:nat8 -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_PinsrqImm dst immediate index tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ index < 2)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64 (va_eval_xmm va_s0 dst) immediate index /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))))
val va_lemma_PinsrqImm : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> immediate:nat64 -> index:nat8 -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_PinsrqImm dst immediate index tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ index < 2)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64 (va_eval_xmm va_s0 dst) immediate index /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))))
let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 864, "start_col": 0, "start_line": 851 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ())))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "max_ifuel": 3, "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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> immediate: Vale.X64.Memory.nat64 -> index: Vale.X64.Memory.nat8 -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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.Decls.va_operand_xmm", "Vale.X64.Memory.nat64", "Vale.X64.Memory.nat8", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_lemma_merge_total", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_lemma_empty_total", "Prims.list", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_tl", "Vale.X64.InsVector.va_lemma_Pinsrq", "Vale.X64.Decls.va_hd", "Vale.X64.Decls.va_coerce_reg_opr64_to_opr64", "Vale.X64.InsBasic.va_lemma_Mov64", "Vale.X64.Decls.va_coerce_reg_opr64_to_dst_opr64", "Vale.X64.Decls.va_const_opr64", "Vale.X64.Decls.va_get_block", "Prims.unit", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_PinsrqImm" ]
[]
false
false
false
false
false
let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp =
va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let va_old_s:va_state = va_s0 in let va_b1:va_codes = va_get_block va_b0 in let va_s2, va_fc2 = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let va_s3, va_fc3 = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let va_sM, va_f3 = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_VPslldq4
val va_lemma_VPslldq4 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_VPslldq4 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ avx_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 (Vale.Def.Words_s.__proj__Mkfour__item__lo0 (va_eval_xmm va_s0 src)) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 (va_eval_xmm va_s0 src)) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 (va_eval_xmm va_s0 src)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
val va_lemma_VPslldq4 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_VPslldq4 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ avx_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 (Vale.Def.Words_s.__proj__Mkfour__item__lo0 (va_eval_xmm va_s0 src)) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 (va_eval_xmm va_s0 src)) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 (va_eval_xmm va_s0 src)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 897, "start_col": 0, "start_line": 891 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> 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.Decls.va_operand_xmm", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_VPslldq", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Prims.unit", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_VPslldq4" ]
[]
false
false
false
false
false
let va_lemma_VPslldq4 va_b0 va_s0 dst src =
va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_Store64_buffer128
val va_codegen_success_Store64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> Tot va_pbool
val va_codegen_success_Store64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> Tot va_pbool
let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ())
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 15, "end_line": 1116, "start_col": 0, "start_line": 1115 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> upper: Prims.bool -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Prims.bool", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_Store64_buffer128 h dst src offset t upper =
(va_ttrue ())
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_Vpsrldq8
val va_code_Vpsrldq8 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code
val va_code_Vpsrldq8 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code
let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src)))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 63, "end_line": 944, "start_col": 0, "start_line": 943 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_VPsrldq", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_Vpsrldq8 dst src =
(mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src)))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_Vpslldq8
val va_wpProof_Vpslldq8 : dst:va_operand_xmm -> src:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Vpslldq8 dst src va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Vpslldq8 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_Vpslldq8 : dst:va_operand_xmm -> src:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Vpslldq8 dst src va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Vpslldq8 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 937, "start_col": 0, "start_line": 931 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> 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_operand_xmm", "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_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_Vpslldq8", "Vale.X64.InsVector.va_code_Vpslldq8" ]
[]
false
false
false
false
false
let va_wpProof_Vpslldq8 dst src va_s0 va_k =
let va_sM, va_f0 = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_Pextrq
val va_lemma_Pextrq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_dst_opr64 -> src:va_operand_xmm -> index:nat8 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Pextrq dst src index) va_s0 /\ va_is_dst_dst_opr64 dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ index < 2)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_dst_opr64 va_sM dst == (if (index = 0) then Vale.Arch.Types.lo64 (va_eval_xmm va_sM src) else Vale.Arch.Types.hi64 (va_eval_xmm va_sM src)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))))
val va_lemma_Pextrq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_dst_opr64 -> src:va_operand_xmm -> index:nat8 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Pextrq dst src index) va_s0 /\ va_is_dst_dst_opr64 dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ index < 2)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_dst_opr64 va_sM dst == (if (index = 0) then Vale.Arch.Types.lo64 (va_eval_xmm va_sM src) else Vale.Arch.Types.hi64 (va_eval_xmm va_sM src)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))))
let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 716, "start_col": 0, "start_line": 708 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "initial_ifuel": 0, "max_fuel": 4, "max_ifuel": 3, "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": 50, "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 -> dst: Vale.X64.Decls.va_operand_dst_opr64 -> src: Vale.X64.Decls.va_operand_xmm -> index: Vale.X64.Memory.nat8 -> 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.Decls.va_operand_dst_opr64", "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Memory.nat8", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Prims.unit", "Vale.Arch.Types.hi64_reveal", "Vale.Arch.Types.lo64_reveal", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.op64", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.opXmm", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Pextrq", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_Pextrq" ]
[]
false
false
false
false
false
let va_lemma_Pextrq va_b0 va_s0 dst src index =
va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_Mov128
val va_code_Mov128 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code
val va_code_Mov128 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code
let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src)))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 60, "end_line": 974, "start_col": 0, "start_line": 973 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Movdqu", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_Mov128 dst src =
(mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src)))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_Vpslldq8
val va_lemma_Vpslldq8 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Vpslldq8 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ avx_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 (Vale.Def.Words_s.__proj__Mkfour__item__lo0 (va_eval_xmm va_s0 src)) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 (va_eval_xmm va_s0 src)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
val va_lemma_Vpslldq8 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Vpslldq8 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ avx_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 (Vale.Def.Words_s.__proj__Mkfour__item__lo0 (va_eval_xmm va_s0 src)) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 (va_eval_xmm va_s0 src)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 927, "start_col": 0, "start_line": 921 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> 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.Decls.va_operand_xmm", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_VPslldq", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Prims.unit", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_Vpslldq8" ]
[]
false
false
false
false
false
let va_lemma_Vpslldq8 va_b0 va_s0 dst src =
va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_ZeroXmm
val va_code_ZeroXmm : dst:va_operand_xmm -> Tot va_code
val va_code_ZeroXmm : dst:va_operand_xmm -> Tot va_code
let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ())))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 59, "end_line": 1150, "start_col": 0, "start_line": 1149 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.InsVector.va_code_Pxor", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_ZeroXmm dst =
(va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ())))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_InitPshufbMask
val va_codegen_success_InitPshufbMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_pbool
val va_codegen_success_InitPshufbMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_pbool
let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ())))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 76, "end_line": 1190, "start_col": 0, "start_line": 1188 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ()))))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsVector.va_codegen_success_PinsrqImm", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_InitPshufbMask dst tmp =
(va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ())))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_ZeroXmm
val va_codegen_success_ZeroXmm : dst:va_operand_xmm -> Tot va_pbool
val va_codegen_success_ZeroXmm : dst:va_operand_xmm -> Tot va_pbool
let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ()))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 64, "end_line": 1154, "start_col": 0, "start_line": 1153 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ())))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsVector.va_codegen_success_Pxor", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_ZeroXmm dst =
(va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ()))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_InitPshufbMask
val va_code_InitPshufbMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_code
val va_code_InitPshufbMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_code
let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ()))))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 46, "end_line": 1185, "start_col": 0, "start_line": 1183 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.InsVector.va_code_PinsrqImm", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_InitPshufbMask dst tmp =
(va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ()))))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_Vpsrldq8
val va_wpProof_Vpsrldq8 : dst:va_operand_xmm -> src:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Vpsrldq8 dst src va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Vpsrldq8 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_Vpsrldq8 : dst:va_operand_xmm -> src:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Vpsrldq8 dst src va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Vpsrldq8 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 967, "start_col": 0, "start_line": 961 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> 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_operand_xmm", "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_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_Vpsrldq8", "Vale.X64.InsVector.va_code_Vpsrldq8" ]
[]
false
false
false
false
false
let va_wpProof_Vpsrldq8 dst src va_s0 va_k =
let va_sM, va_f0 = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_Mov128
val va_lemma_Mov128 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Mov128 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == va_eval_xmm va_s0 src /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
val va_lemma_Mov128 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Mov128 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == va_eval_xmm va_s0 src /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 987, "start_col": 0, "start_line": 981 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> 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.Decls.va_operand_xmm", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Movdqu", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Prims.unit", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_Mov128" ]
[]
false
false
false
false
false
let va_lemma_Mov128 va_b0 va_s0 dst src =
va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_Vpsrldq8
val va_lemma_Vpsrldq8 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Vpsrldq8 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ avx_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi2 (va_eval_xmm va_s0 src)) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 (va_eval_xmm va_s0 src)) 0 0 /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
val va_lemma_Vpsrldq8 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Vpsrldq8 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ avx_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi2 (va_eval_xmm va_s0 src)) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 (va_eval_xmm va_s0 src)) 0 0 /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 957, "start_col": 0, "start_line": 951 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> 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.Decls.va_operand_xmm", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_VPsrldq", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Prims.unit", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_Vpsrldq8" ]
[]
false
false
false
false
false
let va_lemma_Vpsrldq8 va_b0 va_s0 dst src =
va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_InitPshufbStableMask
val va_codegen_success_InitPshufbStableMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_pbool
val va_codegen_success_InitPshufbStableMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_pbool
let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ())))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 79, "end_line": 1230, "start_col": 0, "start_line": 1228 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ()))))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsVector.va_codegen_success_PinsrqImm", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_InitPshufbStableMask dst tmp =
(va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ())))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_InitPshufbStableMask
val va_code_InitPshufbStableMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_code
val va_code_InitPshufbStableMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_code
let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ()))))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 49, "end_line": 1225, "start_col": 0, "start_line": 1223 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.InsVector.va_code_PinsrqImm", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_InitPshufbStableMask dst tmp =
(va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ()))))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_Load128_buffer
val va_code_Load128_buffer : h:va_operand_heaplet -> dst:va_operand_xmm -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> Tot va_code
val va_code_Load128_buffer : h:va_operand_heaplet -> dst:va_operand_xmm -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> Tot va_code
let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t)))))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 89, "end_line": 1004, "start_col": 0, "start_line": 1003 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Movdqu", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Vale.X64.Machine_s.OMem", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Machine_s.maddr", "Vale.X64.Machine_s.MReg", "Vale.X64.Decls.get_reg", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_Load128_buffer h dst src offset t =
(mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t)))))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_Store128_buffer
val va_code_Store128_buffer : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_xmm -> offset:int -> t:taint -> Tot va_code
val va_code_Store128_buffer : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_xmm -> offset:int -> t:taint -> Tot va_code
let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src)))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 89, "end_line": 1076, "start_col": 0, "start_line": 1075 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_xmm -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_operand_xmm", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Movdqu", "Vale.X64.Machine_s.OMem", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Machine_s.maddr", "Vale.X64.Machine_s.MReg", "Vale.X64.Decls.get_reg", "Vale.X64.Machine_s.OReg", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_Store128_buffer h dst src offset t =
(mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src)))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_InitPshufbDupMask
val va_codegen_success_InitPshufbDupMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_pbool
val va_codegen_success_InitPshufbDupMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_pbool
let va_codegen_success_InitPshufbDupMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ())))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 79, "end_line": 1271, "start_col": 0, "start_line": 1269 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask [@ "opaque_to_smt"] let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ()))))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsVector.va_codegen_success_PinsrqImm", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_InitPshufbDupMask dst tmp =
(va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ())))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_Mov128
val va_wpProof_Mov128 : dst:va_operand_xmm -> src:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Mov128 dst src va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Mov128 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_Mov128 : dst:va_operand_xmm -> src:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Mov128 dst src va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Mov128 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 997, "start_col": 0, "start_line": 991 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> 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_operand_xmm", "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_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_Mov128", "Vale.X64.InsVector.va_code_Mov128" ]
[]
false
false
false
false
false
let va_wpProof_Mov128 dst src va_s0 va_k =
let va_sM, va_f0 = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_InitPshufbDupMask
val va_code_InitPshufbDupMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_code
val va_code_InitPshufbDupMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_code
let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ()))))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 49, "end_line": 1266, "start_col": 0, "start_line": 1264 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.InsVector.va_code_PinsrqImm", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_InitPshufbDupMask dst tmp =
(va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ()))))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_LoadBe64_buffer128
val va_code_LoadBe64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> Tot va_code
val va_code_LoadBe64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> Tot va_code
let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t)))))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 23, "end_line": 1038, "start_col": 0, "start_line": 1036 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> upper: Prims.bool -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Prims.bool", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr_annotate", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.op64", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_MovBe64", "Vale.X64.Machine_Semantics_s.AnnotateMovbe64", "Vale.X64.Instruction_s.InstrTypeRecord", "Vale.X64.Machine_s.OMem", "Vale.X64.Machine_s.nat64", "Vale.X64.Machine_s.reg_64", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Machine_s.maddr", "Vale.X64.Machine_s.MReg", "Vale.X64.Decls.get_reg", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_LoadBe64_buffer128 h dst src offset t upper =
(mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t)))))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_LoadBe64_buffer128
val va_lemma_LoadBe64_buffer128 : va_b0:va_code -> va_s0:va_state -> h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> b:buffer128 -> index:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 /\ va_is_src_heaplet h va_s0 /\ va_is_dst_reg_opr64 dst va_s0 /\ va_is_src_reg_opr64 src va_s0 /\ va_get_ok va_s0 /\ movbe_enabled /\ Vale.X64.Decls.valid_src_addr #Vale.X64.Memory.vuint128 (va_eval_heaplet va_s0 h) b index /\ Vale.X64.Memory.valid_layout_buffer #Vale.X64.Memory.vuint128 b (va_get_mem_layout va_s0) (va_eval_heaplet va_s0 h) false /\ Vale.X64.Memory.valid_taint_buf128 b (va_eval_heaplet va_s0 h) ((va_get_mem_layout va_s0).vl_taint) t /\ va_eval_reg_opr64 va_s0 src + offset == Vale.X64.Memory.buffer_addr #Vale.X64.Memory.vuint128 b (va_eval_heaplet va_s0 h) + 16 `op_Multiply` index + (if upper then 8 else 0))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_reg_opr64 va_sM dst == Vale.Def.Types_s.reverse_bytes_nat64 (if upper then Vale.Arch.Types.hi64 (Vale.X64.Decls.buffer128_read b index (va_eval_heaplet va_sM h)) else Vale.Arch.Types.lo64 (Vale.X64.Decls.buffer128_read b index (va_eval_heaplet va_sM h))) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))))
val va_lemma_LoadBe64_buffer128 : va_b0:va_code -> va_s0:va_state -> h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> b:buffer128 -> index:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 /\ va_is_src_heaplet h va_s0 /\ va_is_dst_reg_opr64 dst va_s0 /\ va_is_src_reg_opr64 src va_s0 /\ va_get_ok va_s0 /\ movbe_enabled /\ Vale.X64.Decls.valid_src_addr #Vale.X64.Memory.vuint128 (va_eval_heaplet va_s0 h) b index /\ Vale.X64.Memory.valid_layout_buffer #Vale.X64.Memory.vuint128 b (va_get_mem_layout va_s0) (va_eval_heaplet va_s0 h) false /\ Vale.X64.Memory.valid_taint_buf128 b (va_eval_heaplet va_s0 h) ((va_get_mem_layout va_s0).vl_taint) t /\ va_eval_reg_opr64 va_s0 src + offset == Vale.X64.Memory.buffer_addr #Vale.X64.Memory.vuint128 b (va_eval_heaplet va_s0 h) + 16 `op_Multiply` index + (if upper then 8 else 0))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_reg_opr64 va_sM dst == Vale.Def.Types_s.reverse_bytes_nat64 (if upper then Vale.Arch.Types.hi64 (Vale.X64.Decls.buffer128_read b index (va_eval_heaplet va_sM h)) else Vale.Arch.Types.lo64 (Vale.X64.Decls.buffer128_read b index (va_eval_heaplet va_sM h))) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))))
let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 1058, "start_col": 0, "start_line": 1045 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> upper: Prims.bool -> b: Vale.X64.Memory.buffer128 -> index: Prims.int -> 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.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Prims.bool", "Vale.X64.Memory.buffer128", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Prims.unit", "Vale.X64.Memory.lemma_valid_taint128", "Vale.Arch.HeapImpl.__proj__Mkvale_heap_layout__item__vl_taint", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapImpl.__proj__Mkvale_full_heap__item__vf_heap", "Vale.X64.State.__proj__Mkvale_state__item__vs_heap", "Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64", "Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64", "Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr_annotate", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.op64", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_MovBe64", "Vale.X64.Machine_Semantics_s.AnnotateMovbe64", "Vale.X64.Instruction_s.InstrTypeRecord", "Vale.X64.Machine_s.OMem", "Vale.X64.Machine_s.nat64", "Vale.X64.Machine_s.reg_64", "Vale.X64.Machine_s.maddr", "Vale.X64.Machine_s.MReg", "Vale.X64.Decls.get_reg", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_LoadBe64_buffer128" ]
[]
false
false
false
false
false
let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index =
va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_Load128_buffer
val va_wpProof_Load128_buffer : h:va_operand_heaplet -> dst:va_operand_xmm -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> b:buffer128 -> index:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Load128_buffer h dst src offset t b index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Load128_buffer h dst src offset t) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_Load128_buffer : h:va_operand_heaplet -> dst:va_operand_xmm -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> b:buffer128 -> index:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Load128_buffer h dst src offset t b index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Load128_buffer h dst src offset t) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 1030, "start_col": 0, "start_line": 1023 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> b: Vale.X64.Memory.buffer128 -> index: Prims.int -> 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_operand_heaplet", "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Vale.X64.Memory.buffer128", "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_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_Load128_buffer", "Vale.X64.InsVector.va_code_Load128_buffer" ]
[]
false
false
false
false
false
let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k =
let va_sM, va_f0 = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_LoadBe64_buffer128
val va_wpProof_LoadBe64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> b:buffer128 -> index:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_LoadBe64_buffer128 h dst src offset t upper) ([va_mod_reg_opr64 dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_LoadBe64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> b:buffer128 -> index:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_LoadBe64_buffer128 h dst src offset t upper) ([va_mod_reg_opr64 dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 1069, "start_col": 0, "start_line": 1062 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> upper: Prims.bool -> b: Vale.X64.Memory.buffer128 -> index: Prims.int -> 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_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Prims.bool", "Vale.X64.Memory.buffer128", "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_reg_opr64", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_reg_opr64", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_LoadBe64_buffer128", "Vale.X64.InsVector.va_code_LoadBe64_buffer128" ]
[]
false
false
false
false
false
let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k =
let va_sM, va_f0 = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_Store64_buffer128
val va_wpProof_Store64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> b:buffer128 -> index:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Store64_buffer128 h dst src offset t upper b index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Store64_buffer128 h dst src offset t upper) ([va_Mod_mem; va_mod_heaplet h]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_Store64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> b:buffer128 -> index:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Store64_buffer128 h dst src offset t upper b index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Store64_buffer128 h dst src offset t upper) ([va_Mod_mem; va_mod_heaplet h]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 1143, "start_col": 0, "start_line": 1135 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> upper: Prims.bool -> b: Vale.X64.Memory.buffer128 -> index: Prims.int -> 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_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Prims.bool", "Vale.X64.Memory.buffer128", "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_mem", "Vale.X64.QuickCode.va_mod_heaplet", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_mem", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_heaplet", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_Store64_buffer128", "Vale.X64.InsVector.va_code_Store64_buffer128" ]
[]
false
false
false
false
false
let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k =
let va_sM, va_f0 = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_Store64_buffer128
val va_code_Store64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> Tot va_code
val va_code_Store64_buffer128 : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> Tot va_code
let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 1112, "start_col": 0, "start_line": 1110 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> upper: Prims.bool -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Prims.bool", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr_annotate", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.op64", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Mov64", "Vale.X64.Machine_Semantics_s.AnnotateMov64", "Vale.X64.Instruction_s.InstrTypeRecord", "Vale.X64.Machine_s.OMem", "Vale.X64.Machine_s.nat64", "Vale.X64.Machine_s.reg_64", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Machine_s.maddr", "Vale.X64.Machine_s.MReg", "Vale.X64.Decls.get_reg", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_Store64_buffer128 h dst src offset t upper =
(mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_Pinsrq
val va_lemma_Pinsrq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_opr64 -> index:nat8 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Pinsrq dst src index) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_opr64 src va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ index < 2)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64 (va_eval_xmm va_s0 dst) (va_eval_opr64 va_sM src) index /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
val va_lemma_Pinsrq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_opr64 -> index:nat8 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Pinsrq dst src index) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_opr64 src va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ index < 2)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64 (va_eval_xmm va_s0 dst) (va_eval_opr64 va_sM src) index /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 823, "start_col": 0, "start_line": 814 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "max_ifuel": 3, "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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_opr64 -> index: Vale.X64.Memory.nat8 -> 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.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_opr64", "Vale.X64.Memory.nat8", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Prims.unit", "Prims._assert", "Prims.eq2", "Vale.Def.Types_s.quad32", "Vale.X64.Decls.va_eval_xmm", "Vale.Def.Types_s.insert_nat64_def", "Vale.X64.Decls.va_eval_opr64", "Vale.Def.Types_s.insert_nat64_reveal", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.inOut", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.op64", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Pinsrq", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_Pinsrq" ]
[]
false
false
false
false
false
let va_lemma_Pinsrq va_b0 va_s0 dst src index =
va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_Store128_buffer
val va_wpProof_Store128_buffer : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_xmm -> offset:int -> t:taint -> b:buffer128 -> index:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Store128_buffer h dst src offset t b index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Store128_buffer h dst src offset t) ([va_Mod_mem; va_mod_heaplet h]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_Store128_buffer : h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_xmm -> offset:int -> t:taint -> b:buffer128 -> index:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Store128_buffer h dst src offset t b index va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Store128_buffer h dst src offset t) ([va_Mod_mem; va_mod_heaplet h]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 1104, "start_col": 0, "start_line": 1096 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_xmm -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> b: Vale.X64.Memory.buffer128 -> index: Prims.int -> 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_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_operand_xmm", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Vale.X64.Memory.buffer128", "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_mem", "Vale.X64.QuickCode.va_mod_heaplet", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_mem", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_heaplet", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_Store128_buffer", "Vale.X64.InsVector.va_code_Store128_buffer" ]
[]
false
false
false
false
false
let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k =
let va_sM, va_f0 = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_InitPshufb64Mask
val va_codegen_success_InitPshufb64Mask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_pbool
val va_codegen_success_InitPshufb64Mask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_pbool
let va_codegen_success_InitPshufb64Mask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ())))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 79, "end_line": 1312, "start_col": 0, "start_line": 1310 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask [@ "opaque_to_smt"] let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbDupMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbDupMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbDupMask) (va_code_InitPshufbDupMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbDupMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbDupMask (va_code_InitPshufbDupMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufb64Mask [@ "opaque_to_smt"] let va_code_InitPshufb64Mask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 283686952306183 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ()))))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsVector.va_codegen_success_PinsrqImm", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_InitPshufb64Mask dst tmp =
(va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ())))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_InitPshufb64Mask
val va_code_InitPshufb64Mask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_code
val va_code_InitPshufb64Mask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Tot va_code
let va_code_InitPshufb64Mask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 283686952306183 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ()))))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 49, "end_line": 1307, "start_col": 0, "start_line": 1305 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask [@ "opaque_to_smt"] let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbDupMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbDupMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbDupMask) (va_code_InitPshufbDupMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbDupMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbDupMask (va_code_InitPshufbDupMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufb64Mask
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.InsVector.va_code_PinsrqImm", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_InitPshufb64Mask dst tmp =
(va_Block (va_CCons (va_code_PinsrqImm dst 283686952306183 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ()))))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_ZeroXmm
val va_lemma_ZeroXmm : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_ZeroXmm dst) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 0 0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))))
val va_lemma_ZeroXmm : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_ZeroXmm dst) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 0 0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))))
let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 1166, "start_col": 0, "start_line": 1157 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ()))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> 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.Decls.va_operand_xmm", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_lemma_merge_total", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_lemma_empty_total", "Prims.unit", "Vale.Arch.Types.lemma_quad32_xor", "Prims.list", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_tl", "Vale.X64.InsVector.va_lemma_Pxor", "Vale.X64.Decls.va_hd", "Vale.X64.Decls.va_get_block", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_ZeroXmm" ]
[]
false
false
false
false
false
let va_lemma_ZeroXmm va_b0 va_s0 dst =
va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let va_old_s:va_state = va_s0 in let va_b1:va_codes = va_get_block va_b0 in let va_s2, va_fc2 = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let va_sM, va_f2 = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_code_XmmEqual
val va_code_XmmEqual : x1:va_operand_xmm -> x2:va_operand_xmm -> Tot va_code
val va_code_XmmEqual : x1:va_operand_xmm -> x2:va_operand_xmm -> Tot va_code
let va_code_XmmEqual x1 x2 = (va_Block (va_CCons (va_code_Pcmpeqd x1 x2) (va_CCons (va_code_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 0) (va_CCons (va_code_Nat64Equal (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx)) (va_CCons (va_code_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 1) (va_CCons (va_code_Nat64Equal (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx)) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CNil ()))))))))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 93, "end_line": 1350, "start_col": 0, "start_line": 1345 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask [@ "opaque_to_smt"] let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbDupMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbDupMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbDupMask) (va_code_InitPshufbDupMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbDupMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbDupMask (va_code_InitPshufbDupMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufb64Mask [@ "opaque_to_smt"] let va_code_InitPshufb64Mask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 283686952306183 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufb64Mask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufb64Mask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufb64Mask) (va_code_InitPshufb64Mask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 283686952306183 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufb64Mask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufb64Mask (va_code_InitPshufb64Mask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- XmmEqual
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
x1: Vale.X64.Decls.va_operand_xmm -> x2: Vale.X64.Decls.va_operand_xmm -> Vale.X64.Decls.va_code
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.InsVector.va_code_Pcmpeqd", "Vale.X64.InsVector.va_code_Pextrq", "Vale.X64.Decls.va_op_dst_opr64_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.InsBasic.va_code_Nat64Equal", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.InsBasic.va_code_Add64", "Vale.X64.Decls.va_op_opr64_reg64", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
false
false
false
true
false
let va_code_XmmEqual x1 x2 =
(va_Block (va_CCons (va_code_Pcmpeqd x1 x2) (va_CCons (va_code_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 0) (va_CCons (va_code_Nat64Equal (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx)) (va_CCons (va_code_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 1) (va_CCons (va_code_Nat64Equal (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx)) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CNil ()))))))))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_codegen_success_XmmEqual
val va_codegen_success_XmmEqual : x1:va_operand_xmm -> x2:va_operand_xmm -> Tot va_pbool
val va_codegen_success_XmmEqual : x1:va_operand_xmm -> x2:va_operand_xmm -> Tot va_pbool
let va_codegen_success_XmmEqual x1 x2 = (va_pbool_and (va_codegen_success_Pcmpeqd x1 x2) (va_pbool_and (va_codegen_success_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 0) (va_pbool_and (va_codegen_success_Nat64Equal (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 1) (va_pbool_and (va_codegen_success_Nat64Equal (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_ttrue ())))))))
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 23, "end_line": 1360, "start_col": 0, "start_line": 1353 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask [@ "opaque_to_smt"] let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbDupMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbDupMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbDupMask) (va_code_InitPshufbDupMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbDupMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbDupMask (va_code_InitPshufbDupMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufb64Mask [@ "opaque_to_smt"] let va_code_InitPshufb64Mask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 283686952306183 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufb64Mask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufb64Mask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufb64Mask) (va_code_InitPshufb64Mask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 283686952306183 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufb64Mask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufb64Mask (va_code_InitPshufb64Mask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- XmmEqual [@ "opaque_to_smt"] let va_code_XmmEqual x1 x2 = (va_Block (va_CCons (va_code_Pcmpeqd x1 x2) (va_CCons (va_code_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 0) (va_CCons (va_code_Nat64Equal (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx)) (va_CCons (va_code_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 1) (va_CCons (va_code_Nat64Equal (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx)) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CNil ()))))))))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
x1: Vale.X64.Decls.va_operand_xmm -> x2: Vale.X64.Decls.va_operand_xmm -> Vale.X64.Decls.va_pbool
Prims.Tot
[ "total" ]
[]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsVector.va_codegen_success_Pcmpeqd", "Vale.X64.InsVector.va_codegen_success_Pextrq", "Vale.X64.Decls.va_op_dst_opr64_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.InsBasic.va_codegen_success_Nat64Equal", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.InsBasic.va_codegen_success_Add64", "Vale.X64.Decls.va_op_opr64_reg64", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
false
false
false
true
false
let va_codegen_success_XmmEqual x1 x2 =
(va_pbool_and (va_codegen_success_Pcmpeqd x1 x2) (va_pbool_and (va_codegen_success_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 0) (va_pbool_and (va_codegen_success_Nat64Equal (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 1) (va_pbool_and (va_codegen_success_Nat64Equal (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_ttrue ())))))))
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_Load128_buffer
val va_lemma_Load128_buffer : va_b0:va_code -> va_s0:va_state -> h:va_operand_heaplet -> dst:va_operand_xmm -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> b:buffer128 -> index:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Load128_buffer h dst src offset t) va_s0 /\ va_is_src_heaplet h va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_reg_opr64 src va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ Vale.X64.Decls.valid_src_addr #Vale.X64.Memory.vuint128 (va_eval_heaplet va_s0 h) b index /\ Vale.X64.Memory.valid_layout_buffer #Vale.X64.Memory.vuint128 b (va_get_mem_layout va_s0) (va_eval_heaplet va_s0 h) false /\ Vale.X64.Memory.valid_taint_buf128 b (va_eval_heaplet va_s0 h) ((va_get_mem_layout va_s0).vl_taint) t /\ va_eval_reg_opr64 va_s0 src + offset == Vale.X64.Memory.buffer_addr #Vale.X64.Memory.vuint128 b (va_eval_heaplet va_s0 h) + 16 `op_Multiply` index)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.X64.Decls.buffer128_read b index (va_eval_heaplet va_sM h) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
val va_lemma_Load128_buffer : va_b0:va_code -> va_s0:va_state -> h:va_operand_heaplet -> dst:va_operand_xmm -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> b:buffer128 -> index:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Load128_buffer h dst src offset t) va_s0 /\ va_is_src_heaplet h va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_reg_opr64 src va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ Vale.X64.Decls.valid_src_addr #Vale.X64.Memory.vuint128 (va_eval_heaplet va_s0 h) b index /\ Vale.X64.Memory.valid_layout_buffer #Vale.X64.Memory.vuint128 b (va_get_mem_layout va_s0) (va_eval_heaplet va_s0 h) false /\ Vale.X64.Memory.valid_taint_buf128 b (va_eval_heaplet va_s0 h) ((va_get_mem_layout va_s0).vl_taint) t /\ va_eval_reg_opr64 va_s0 src + offset == Vale.X64.Memory.buffer_addr #Vale.X64.Memory.vuint128 b (va_eval_heaplet va_s0 h) + 16 `op_Multiply` index)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.X64.Decls.buffer128_read b index (va_eval_heaplet va_sM h) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))))
let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 1019, "start_col": 0, "start_line": 1011 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> b: Vale.X64.Memory.buffer128 -> index: Prims.int -> 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.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Vale.X64.Memory.buffer128", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Prims.unit", "Vale.X64.Memory_Sems.low_lemma_load_mem128_full", "Vale.X64.State.__proj__Mkvale_state__item__vs_heap", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Movdqu", "Vale.X64.Machine_s.OReg", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Vale.X64.Machine_s.OMem", "Vale.X64.Machine_s.maddr", "Vale.X64.Machine_s.MReg", "Vale.X64.Decls.get_reg", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_Load128_buffer" ]
[]
false
false
false
false
false
let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index =
va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t)))) ) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_Store128_buffer
val va_lemma_Store128_buffer : va_b0:va_code -> va_s0:va_state -> h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_xmm -> offset:int -> t:taint -> b:buffer128 -> index:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Store128_buffer h dst src offset t) va_s0 /\ va_is_dst_heaplet h va_s0 /\ va_is_src_reg_opr64 dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ Vale.X64.Decls.valid_dst_addr #Vale.X64.Memory.vuint128 (va_eval_heaplet va_s0 h) b index /\ Vale.X64.Memory.valid_layout_buffer #Vale.X64.Memory.vuint128 b (va_get_mem_layout va_s0) (va_eval_heaplet va_s0 h) true /\ Vale.X64.Memory.valid_taint_buf128 b (va_eval_heaplet va_s0 h) ((va_get_mem_layout va_s0).vl_taint) t /\ va_eval_reg_opr64 va_s0 dst + offset == Vale.X64.Memory.buffer_addr #Vale.X64.Memory.vuint128 b (va_eval_heaplet va_s0 h) + 16 `op_Multiply` index)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_heaplet va_sM h == buffer128_write b index (va_eval_xmm va_s0 src) (va_eval_heaplet va_s0 h) /\ va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))))
val va_lemma_Store128_buffer : va_b0:va_code -> va_s0:va_state -> h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_xmm -> offset:int -> t:taint -> b:buffer128 -> index:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Store128_buffer h dst src offset t) va_s0 /\ va_is_dst_heaplet h va_s0 /\ va_is_src_reg_opr64 dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ Vale.X64.Decls.valid_dst_addr #Vale.X64.Memory.vuint128 (va_eval_heaplet va_s0 h) b index /\ Vale.X64.Memory.valid_layout_buffer #Vale.X64.Memory.vuint128 b (va_get_mem_layout va_s0) (va_eval_heaplet va_s0 h) true /\ Vale.X64.Memory.valid_taint_buf128 b (va_eval_heaplet va_s0 h) ((va_get_mem_layout va_s0).vl_taint) t /\ va_eval_reg_opr64 va_s0 dst + offset == Vale.X64.Memory.buffer_addr #Vale.X64.Memory.vuint128 b (va_eval_heaplet va_s0 h) + 16 `op_Multiply` index)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_heaplet va_sM h == buffer128_write b index (va_eval_xmm va_s0 src) (va_eval_heaplet va_s0 h) /\ va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))))
let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 1092, "start_col": 0, "start_line": 1083 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_xmm -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> b: Vale.X64.Memory.buffer128 -> index: Prims.int -> 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.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_operand_xmm", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Vale.X64.Memory.buffer128", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Prims.unit", "Vale.X64.Memory_Sems.low_lemma_store_mem128_full", "Vale.X64.Decls.va_eval_xmm", "Vale.X64.State.__proj__Mkvale_state__item__vs_heap", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.opXmm", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Movdqu", "Vale.X64.Machine_s.OMem", "Vale.X64.Machine_s.quad32", "Vale.X64.Machine_s.reg_xmm", "Vale.X64.Machine_s.maddr", "Vale.X64.Machine_s.MReg", "Vale.X64.Decls.get_reg", "Vale.X64.Machine_s.OReg", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_Store128_buffer" ]
[]
false
false
false
false
false
let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index =
va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src)) ) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_ZeroXmm
val va_wpProof_ZeroXmm : dst:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_ZeroXmm dst va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_ZeroXmm dst) ([va_Mod_flags; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_ZeroXmm : dst:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_ZeroXmm dst va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_ZeroXmm dst) ([va_Mod_flags; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 1177, "start_col": 0, "start_line": 1170 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> 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_operand_xmm", "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_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_ZeroXmm", "Vale.X64.InsVector.va_code_ZeroXmm" ]
[]
false
false
false
false
false
let va_wpProof_ZeroXmm dst va_s0 va_k =
let va_sM, va_f0 = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_Store64_buffer128
val va_lemma_Store64_buffer128 : va_b0:va_code -> va_s0:va_state -> h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> b:buffer128 -> index:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 /\ va_is_dst_heaplet h va_s0 /\ va_is_src_reg_opr64 dst va_s0 /\ va_is_src_reg_opr64 src va_s0 /\ va_get_ok va_s0 /\ Vale.X64.Decls.valid_dst_addr #Vale.X64.Memory.vuint128 (va_eval_heaplet va_s0 h) b index /\ Vale.X64.Memory.valid_layout_buffer #Vale.X64.Memory.vuint128 b (va_get_mem_layout va_s0) (va_eval_heaplet va_s0 h) true /\ Vale.X64.Memory.valid_taint_buf128 b (va_eval_heaplet va_s0 h) ((va_get_mem_layout va_s0).vl_taint) t /\ va_eval_reg_opr64 va_s0 dst + offset == Vale.X64.Memory.buffer_addr #Vale.X64.Memory.vuint128 b (va_eval_heaplet va_s0 h) + 16 `op_Multiply` index + (if upper then 8 else 0))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_heaplet va_sM h == buffer128_write b index (Vale.Def.Types_s.insert_nat64 (Vale.X64.Decls.buffer128_read b index (va_eval_heaplet va_s0 h)) (va_eval_reg_opr64 va_s0 src) (if upper then 1 else 0)) (va_eval_heaplet va_s0 h) /\ va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))))
val va_lemma_Store64_buffer128 : va_b0:va_code -> va_s0:va_state -> h:va_operand_heaplet -> dst:va_operand_reg_opr64 -> src:va_operand_reg_opr64 -> offset:int -> t:taint -> upper:bool -> b:buffer128 -> index:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 /\ va_is_dst_heaplet h va_s0 /\ va_is_src_reg_opr64 dst va_s0 /\ va_is_src_reg_opr64 src va_s0 /\ va_get_ok va_s0 /\ Vale.X64.Decls.valid_dst_addr #Vale.X64.Memory.vuint128 (va_eval_heaplet va_s0 h) b index /\ Vale.X64.Memory.valid_layout_buffer #Vale.X64.Memory.vuint128 b (va_get_mem_layout va_s0) (va_eval_heaplet va_s0 h) true /\ Vale.X64.Memory.valid_taint_buf128 b (va_eval_heaplet va_s0 h) ((va_get_mem_layout va_s0).vl_taint) t /\ va_eval_reg_opr64 va_s0 dst + offset == Vale.X64.Memory.buffer_addr #Vale.X64.Memory.vuint128 b (va_eval_heaplet va_s0 h) + 16 `op_Multiply` index + (if upper then 8 else 0))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_heaplet va_sM h == buffer128_write b index (Vale.Def.Types_s.insert_nat64 (Vale.X64.Decls.buffer128_read b index (va_eval_heaplet va_s0 h)) (va_eval_reg_opr64 va_s0 src) (if upper then 1 else 0)) (va_eval_heaplet va_s0 h) /\ va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))))
let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 1131, "start_col": 0, "start_line": 1119 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ())
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> h: Vale.X64.Decls.va_operand_heaplet -> dst: Vale.X64.Decls.va_operand_reg_opr64 -> src: Vale.X64.Decls.va_operand_reg_opr64 -> offset: Prims.int -> t: Vale.Arch.HeapTypes_s.taint -> upper: Prims.bool -> b: Vale.X64.Memory.buffer128 -> index: Prims.int -> 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.Decls.va_operand_heaplet", "Vale.X64.Decls.va_operand_reg_opr64", "Prims.int", "Vale.Arch.HeapTypes_s.taint", "Prims.bool", "Vale.X64.Memory.buffer128", "Vale.X64.State.vale_state", "Vale.X64.Lemmas.fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Prims.unit", "Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full", "Vale.X64.Decls.va_eval_reg_opr64", "Vale.X64.State.__proj__Mkvale_state__item__vs_heap", "Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full", "FStar.Pervasives.Native.tuple2", "Prims.nat", "Vale.X64.Decls.va_eval_ins", "Vale.X64.Taint_Semantics.mk_ins", "Vale.X64.InsLemmas.make_instr_annotate", "Prims.Cons", "Vale.X64.Instruction_s.instr_out", "Vale.X64.Instruction_s.out", "Vale.X64.Instruction_s.op64", "Prims.Nil", "Vale.X64.Instruction_s.instr_operand", "Vale.X64.Instruction_s.PreserveFlags", "Vale.X64.Instructions_s.ins_Mov64", "Vale.X64.Machine_Semantics_s.AnnotateMov64", "Vale.X64.Instruction_s.InstrTypeRecord", "Vale.X64.Machine_s.OMem", "Vale.X64.Machine_s.nat64", "Vale.X64.Machine_s.reg_64", "Vale.X64.Machine_s.maddr", "Vale.X64.Machine_s.MReg", "Vale.X64.Decls.get_reg", "Vale.X64.Decls.va_ins_lemma", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_Store64_buffer128" ]
[]
false
false
false
false
false
let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index =
va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let va_old_s:va_state = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let va_sM, va_fM = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_InitPshufbMask
val va_lemma_InitPshufbMask : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_InitPshufbMask dst tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 202182159 134810123 67438087 66051 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))))
val va_lemma_InitPshufbMask : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_InitPshufbMask dst tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 202182159 134810123 67438087 66051 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))))
let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 1206, "start_col": 0, "start_line": 1193 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ())))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_lemma_merge_total", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_lemma_empty_total", "Prims.unit", "Vale.Def.Types_s.insert_nat64_reveal", "Prims.list", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_tl", "Vale.X64.InsVector.va_lemma_PinsrqImm", "Vale.X64.Decls.va_hd", "Vale.Arch.Types.lemma_nat_to_two32", "Vale.X64.Decls.va_get_block", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_InitPshufbMask" ]
[]
false
false
false
false
false
let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp =
va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let va_old_s:va_state = va_s0 in let va_b1:va_codes = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let va_s3, va_fc3 = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let va_s4, va_fc4 = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let va_sM, va_f4 = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_InitPshufbStableMask
val va_wpProof_InitPshufbStableMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_InitPshufbStableMask dst tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_InitPshufbStableMask dst tmp) ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_InitPshufbStableMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_InitPshufbStableMask dst tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_InitPshufbStableMask dst tmp) ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 1258, "start_col": 0, "start_line": 1250 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "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_reg_opr64", "Vale.X64.QuickCode.va_mod_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_reg_opr64", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_InitPshufbStableMask", "Vale.X64.InsVector.va_code_InitPshufbStableMask" ]
[]
false
false
false
false
false
let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k =
let va_sM, va_f0 = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_InitPshufbStableMask
val va_lemma_InitPshufbStableMask : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_InitPshufbStableMask dst tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))))
val va_lemma_InitPshufbStableMask : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_InitPshufbStableMask dst tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))))
let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 1246, "start_col": 0, "start_line": 1233 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ())))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_lemma_merge_total", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_lemma_empty_total", "Prims.unit", "Vale.Def.Types_s.insert_nat64_reveal", "Prims.list", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_tl", "Vale.X64.InsVector.va_lemma_PinsrqImm", "Vale.X64.Decls.va_hd", "Vale.Arch.Types.lemma_nat_to_two32", "Vale.X64.Decls.va_get_block", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_InitPshufbStableMask" ]
[]
false
false
false
false
false
let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp =
va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let va_old_s:va_state = va_s0 in let va_b1:va_codes = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let va_s3, va_fc3 = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let va_s4, va_fc4 = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let va_sM, va_f4 = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_InitPshufbMask
val va_wpProof_InitPshufbMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_InitPshufbMask dst tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_InitPshufbMask dst tmp) ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_InitPshufbMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_InitPshufbMask dst tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_InitPshufbMask dst tmp) ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 1217, "start_col": 0, "start_line": 1210 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "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_reg_opr64", "Vale.X64.QuickCode.va_mod_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_reg_opr64", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_InitPshufbMask", "Vale.X64.InsVector.va_code_InitPshufbMask" ]
[]
false
false
false
false
false
let va_wpProof_InitPshufbMask dst tmp va_s0 va_k =
let va_sM, va_f0 = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_InitPshufbDupMask
val va_wpProof_InitPshufbDupMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_InitPshufbDupMask dst tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_InitPshufbDupMask dst tmp) ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_InitPshufbDupMask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_InitPshufbDupMask dst tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_InitPshufbDupMask dst tmp) ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_InitPshufbDupMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbDupMask (va_code_InitPshufbDupMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 1299, "start_col": 0, "start_line": 1291 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask [@ "opaque_to_smt"] let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbDupMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbDupMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbDupMask) (va_code_InitPshufbDupMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "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_reg_opr64", "Vale.X64.QuickCode.va_mod_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_reg_opr64", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_InitPshufbDupMask", "Vale.X64.InsVector.va_code_InitPshufbDupMask" ]
[]
false
false
false
false
false
let va_wpProof_InitPshufbDupMask dst tmp va_s0 va_k =
let va_sM, va_f0 = va_lemma_InitPshufbDupMask (va_code_InitPshufbDupMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_InitPshufb64Mask
val va_wpProof_InitPshufb64Mask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_InitPshufb64Mask dst tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_InitPshufb64Mask dst tmp) ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_InitPshufb64Mask : dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_InitPshufb64Mask dst tmp va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_InitPshufb64Mask dst tmp) ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_InitPshufb64Mask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufb64Mask (va_code_InitPshufb64Mask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 1339, "start_col": 0, "start_line": 1332 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask [@ "opaque_to_smt"] let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbDupMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbDupMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbDupMask) (va_code_InitPshufbDupMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbDupMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbDupMask (va_code_InitPshufbDupMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufb64Mask [@ "opaque_to_smt"] let va_code_InitPshufb64Mask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 283686952306183 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufb64Mask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufb64Mask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufb64Mask) (va_code_InitPshufb64Mask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 283686952306183 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "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_reg_opr64", "Vale.X64.QuickCode.va_mod_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_operand_reg_opr64", "Vale.X64.Decls.va_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_InitPshufb64Mask", "Vale.X64.InsVector.va_code_InitPshufb64Mask" ]
[]
false
false
false
false
false
let va_wpProof_InitPshufb64Mask dst tmp va_s0 va_k =
let va_sM, va_f0 = va_lemma_InitPshufb64Mask (va_code_InitPshufb64Mask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_InitPshufbDupMask
val va_lemma_InitPshufbDupMask : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_InitPshufbDupMask dst tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 202182159 134810123 202182159 134810123 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))))
val va_lemma_InitPshufbDupMask : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_InitPshufbDupMask dst tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 202182159 134810123 202182159 134810123 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))))
let va_lemma_InitPshufbDupMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbDupMask) (va_code_InitPshufbDupMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 1287, "start_col": 0, "start_line": 1274 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask [@ "opaque_to_smt"] let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbDupMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ())))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_lemma_merge_total", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_lemma_empty_total", "Prims.unit", "Vale.Def.Types_s.insert_nat64_reveal", "Prims.list", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_tl", "Vale.X64.InsVector.va_lemma_PinsrqImm", "Vale.X64.Decls.va_hd", "Vale.Arch.Types.lemma_nat_to_two32", "Vale.X64.Decls.va_get_block", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_InitPshufbDupMask" ]
[]
false
false
false
false
false
let va_lemma_InitPshufbDupMask va_b0 va_s0 dst tmp =
va_reveal_opaque (`%va_code_InitPshufbDupMask) (va_code_InitPshufbDupMask dst tmp); let va_old_s:va_state = va_s0 in let va_b1:va_codes = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let va_s3, va_fc3 = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let va_s4, va_fc4 = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let va_sM, va_f4 = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_InitPshufb64Mask
val va_lemma_InitPshufb64Mask : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_InitPshufb64Mask dst tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 67438087 66051 202182159 134810123 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))))
val va_lemma_InitPshufb64Mask : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> tmp:va_operand_reg_opr64 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_InitPshufb64Mask dst tmp) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_dst_reg_opr64 tmp va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 67438087 66051 202182159 134810123 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))))
let va_lemma_InitPshufb64Mask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufb64Mask) (va_code_InitPshufb64Mask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 283686952306183 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 1328, "start_col": 0, "start_line": 1315 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask [@ "opaque_to_smt"] let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbDupMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbDupMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbDupMask) (va_code_InitPshufbDupMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbDupMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbDupMask (va_code_InitPshufbDupMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufb64Mask [@ "opaque_to_smt"] let va_code_InitPshufb64Mask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 283686952306183 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufb64Mask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ())))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> dst: Vale.X64.Decls.va_operand_xmm -> tmp: Vale.X64.Decls.va_operand_reg_opr64 -> 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.Decls.va_operand_xmm", "Vale.X64.Decls.va_operand_reg_opr64", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_lemma_merge_total", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_lemma_empty_total", "Prims.unit", "Vale.Def.Types_s.insert_nat64_reveal", "Prims.list", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_tl", "Vale.X64.InsVector.va_lemma_PinsrqImm", "Vale.X64.Decls.va_hd", "Vale.Arch.Types.lemma_nat_to_two32", "Vale.X64.Decls.va_get_block", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_InitPshufb64Mask" ]
[]
false
false
false
false
false
let va_lemma_InitPshufb64Mask va_b0 va_s0 dst tmp =
va_reveal_opaque (`%va_code_InitPshufb64Mask) (va_code_InitPshufb64Mask dst tmp); let va_old_s:va_state = va_s0 in let va_b1:va_codes = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let va_s3, va_fc3 = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 283686952306183 0 tmp in let va_b3 = va_tl va_b1 in let va_s4, va_fc4 = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let va_sM, va_f4 = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM)
false
Pulse.Soundness.WithLocalArray.fst
Pulse.Soundness.WithLocalArray.withlocalarray_soundness
val withlocalarray_soundness (#g:stt_env) (#t:st_term) (#c:comp) (d:st_typing g t c{T_WithLocalArray? d}) (soundness:soundness_t d) : GTot (RT.tot_typing (elab_env g) (elab_st_typing d) (elab_comp c))
val withlocalarray_soundness (#g:stt_env) (#t:st_term) (#c:comp) (d:st_typing g t c{T_WithLocalArray? d}) (soundness:soundness_t d) : GTot (RT.tot_typing (elab_env g) (elab_st_typing d) (elab_comp c))
let withlocalarray_soundness #g #t #c d soundness = let T_WithLocalArray _ _ init len body init_t c x init_typing len_typing init_t_typing c_typing body_typing = d in let CT_ST _ st st_typing = c_typing in let rg = elab_env g in let ru = comp_u c in let ra = elab_term init_t in let rinit = elab_term init in let rlen = elab_term len in let rpre = elab_term (comp_pre c) in let rret_t = elab_term (comp_res c) in let rpost = elab_term (comp_post c) in let rbody = elab_st_typing body_typing in let a_typing = tot_typing_soundness init_t_typing in let rinit_typing = tot_typing_soundness init_typing in let rlen_typing = tot_typing_soundness len_typing in let cres_typing, cpre_typing, cpost_typing = Pulse.Soundness.Comp.stc_soundness st_typing in let pre_typing = cpre_typing in let ret_t_typing = cres_typing in let post_typing = cpost_typing in elab_push_binding g x (mk_array init_t); let rbody_typing = soundness _ _ _ body_typing in WT.with_localarray_typing #rg #ru #ra #rinit #rlen #rpre #rret_t #rpost #rbody x a_typing rinit_typing rlen_typing pre_typing ret_t_typing post_typing rbody_typing
{ "file_name": "lib/steel/pulse/Pulse.Soundness.WithLocalArray.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 16, "end_line": 73, "start_col": 0, "start_line": 29 }
(* 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.Soundness.WithLocalArray open Pulse.Syntax open Pulse.Reflection.Util open Pulse.Typing open Pulse.Elaborate.Core open Pulse.Elaborate open Pulse.Soundness.Common module WT = Pulse.Steel.Wrapper.Typing
{ "checked_file": "/", "dependencies": [ "Pulse.Typing.fst.checked", "Pulse.Syntax.fst.checked", "Pulse.Steel.Wrapper.Typing.fsti.checked", "Pulse.Soundness.Comp.fsti.checked", "Pulse.Soundness.Common.fst.checked", "Pulse.Reflection.Util.fst.checked", "Pulse.Elaborate.Core.fst.checked", "Pulse.Elaborate.fsti.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Pulse.Soundness.WithLocalArray.fst" }
[ { "abbrev": true, "full_module": "Pulse.Steel.Wrapper.Typing", "short_module": "WT" }, { "abbrev": false, "full_module": "Pulse.Soundness.Common", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Elaborate", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Elaborate.Core", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Typing", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Reflection.Util", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Syntax", "short_module": null }, { "abbrev": true, "full_module": "FStar.Reflection.Typing", "short_module": "RT" }, { "abbrev": false, "full_module": "Pulse.Soundness.Common", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Elaborate.Core", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Elaborate.Pure", "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.Soundness", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Soundness", "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": 8, "initial_ifuel": 1, "max_fuel": 8, "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": 5, "z3rlimit_factor": 10, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
d: Pulse.Typing.st_typing g t c {T_WithLocalArray? d} -> soundness: Pulse.Soundness.Common.soundness_t d -> Prims.GTot (FStar.Reflection.Typing.tot_typing (Pulse.Typing.elab_env g) (Pulse.Elaborate.Core.elab_st_typing d) (Pulse.Elaborate.Pure.elab_comp c))
Prims.GTot
[ "sometrivial" ]
[]
[ "Pulse.Soundness.Common.stt_env", "Pulse.Syntax.Base.st_term", "Pulse.Syntax.Base.comp", "Pulse.Typing.st_typing", "Prims.b2t", "Pulse.Typing.uu___is_T_WithLocalArray", "Pulse.Soundness.Common.soundness_t", "Pulse.Typing.Env.env", "Pulse.Syntax.Base.ppname", "Pulse.Syntax.Base.term", "Pulse.Syntax.Base.uu___is_C_ST", "Pulse.Syntax.Base.var", "Prims.l_and", "FStar.Pervasives.Native.uu___is_None", "Pulse.Syntax.Base.typ", "Pulse.Typing.Env.lookup", "Prims.l_not", "FStar.Set.mem", "Pulse.Syntax.Naming.freevars_st", "Pulse.Typing.tot_typing", "Pulse.Typing.tm_szt", "Pulse.Typing.universe_of", "Pulse.Syntax.Pure.u0", "Pulse.Typing.comp_typing_u", "Pulse.Typing.Env.push_binding", "Pulse.Syntax.Base.ppname_default", "Pulse.Typing.mk_array", "Pulse.Syntax.Naming.open_st_term_nv", "Pulse.Syntax.Base.v_as_nv", "Pulse.Typing.comp_withlocal_array_body", "Pulse.Syntax.Base.st_comp", "Pulse.Typing.st_comp_typing", "FStar.Reflection.Typing.tot_typing", "Pulse.Typing.elab_env", "Pulse.Elaborate.Pure.elab_term", "Pulse.Syntax.Base.__proj__Mkst_comp__item__res", "FStar.Reflection.Typing.tm_type", "Pulse.Syntax.Base.__proj__Mkst_comp__item__u", "Pulse.Syntax.Base.__proj__Mkst_comp__item__pre", "Pulse.Reflection.Util.vprop_tm", "Pulse.Reflection.Util.mk_abs", "FStar.Stubs.Reflection.V2.Data.Q_Explicit", "Pulse.Syntax.Base.__proj__Mkst_comp__item__post", "Pulse.Soundness.Common.post1_type_bind", "Pulse.Steel.Wrapper.Typing.with_localarray_typing", "Pulse.Elaborate.Core.elab_st_typing", "Pulse.Elaborate.Pure.elab_comp", "Prims.unit", "Pulse.Typing.elab_push_binding", "FStar.Pervasives.Native.tuple3", "Pulse.Soundness.Comp.stc_soundness", "Pulse.Soundness.Common.tot_typing_soundness", "Pulse.Syntax.Pure.tm_type", "FStar.Stubs.Reflection.Types.term", "Pulse.Syntax.Base.comp_post", "Pulse.Syntax.Base.comp_res", "Pulse.Syntax.Base.comp_pre", "Pulse.Syntax.Base.universe", "Pulse.Syntax.Base.comp_u", "FStar.Stubs.Reflection.Types.env" ]
[]
false
false
false
false
false
let withlocalarray_soundness #g #t #c d soundness =
let T_WithLocalArray _ _ init len body init_t c x init_typing len_typing init_t_typing c_typing body_typing = d in let CT_ST _ st st_typing = c_typing in let rg = elab_env g in let ru = comp_u c in let ra = elab_term init_t in let rinit = elab_term init in let rlen = elab_term len in let rpre = elab_term (comp_pre c) in let rret_t = elab_term (comp_res c) in let rpost = elab_term (comp_post c) in let rbody = elab_st_typing body_typing in let a_typing = tot_typing_soundness init_t_typing in let rinit_typing = tot_typing_soundness init_typing in let rlen_typing = tot_typing_soundness len_typing in let cres_typing, cpre_typing, cpost_typing = Pulse.Soundness.Comp.stc_soundness st_typing in let pre_typing = cpre_typing in let ret_t_typing = cres_typing in let post_typing = cpost_typing in elab_push_binding g x (mk_array init_t); let rbody_typing = soundness _ _ _ body_typing in WT.with_localarray_typing #rg #ru #ra #rinit #rlen #rpre #rret_t #rpost #rbody x a_typing rinit_typing rlen_typing pre_typing ret_t_typing post_typing rbody_typing
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_wpProof_XmmEqual
val va_wpProof_XmmEqual : x1:va_operand_xmm -> x2:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_XmmEqual x1 x2 va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_XmmEqual x1 x2) ([va_Mod_flags; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_mod_xmm x1]) va_s0 va_k ((va_sM, va_f0, va_g))))
val va_wpProof_XmmEqual : x1:va_operand_xmm -> x2:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_XmmEqual x1 x2 va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_XmmEqual x1 x2) ([va_Mod_flags; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_mod_xmm x1]) va_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_XmmEqual x1 x2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_XmmEqual (va_code_XmmEqual x1 x2) va_s0 x1 x2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_operand_xmm x1 va_sM va_s0)))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_mod_xmm x1]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 22, "end_line": 1407, "start_col": 0, "start_line": 1399 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask [@ "opaque_to_smt"] let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbDupMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbDupMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbDupMask) (va_code_InitPshufbDupMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbDupMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbDupMask (va_code_InitPshufbDupMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufb64Mask [@ "opaque_to_smt"] let va_code_InitPshufb64Mask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 283686952306183 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufb64Mask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufb64Mask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufb64Mask) (va_code_InitPshufb64Mask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 283686952306183 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufb64Mask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufb64Mask (va_code_InitPshufb64Mask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- XmmEqual [@ "opaque_to_smt"] let va_code_XmmEqual x1 x2 = (va_Block (va_CCons (va_code_Pcmpeqd x1 x2) (va_CCons (va_code_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 0) (va_CCons (va_code_Nat64Equal (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx)) (va_CCons (va_code_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 1) (va_CCons (va_code_Nat64Equal (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx)) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CNil ())))))))) [@ "opaque_to_smt"] let va_codegen_success_XmmEqual x1 x2 = (va_pbool_and (va_codegen_success_Pcmpeqd x1 x2) (va_pbool_and (va_codegen_success_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 0) (va_pbool_and (va_codegen_success_Nat64Equal (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 1) (va_pbool_and (va_codegen_success_Nat64Equal (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_ttrue ()))))))) [@"opaque_to_smt"] let va_lemma_XmmEqual va_b0 va_s0 x1 x2 = va_reveal_opaque (`%va_code_XmmEqual) (va_code_XmmEqual x1 x2); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s4, va_fc4) = va_lemma_Pcmpeqd (va_hd va_b1) va_s0 x1 x2 in let va_b4 = va_tl va_b1 in let (va_s5, va_fc5) = va_lemma_Pextrq (va_hd va_b4) va_s4 (va_op_dst_opr64_reg64 rRdx) x1 0 in let va_b5 = va_tl va_b4 in let (tmp1:nat64) = va_get_reg64 rRdx va_s5 in Vale.Arch.Types.lemma_equality_check_helper (va_eval_xmm va_s5 x1); let (va_s8, va_fc8) = va_lemma_Nat64Equal (va_hd va_b5) va_s5 (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx) in let va_b8 = va_tl va_b5 in let (result1:nat64) = va_get_reg64 rRax va_s8 in let (va_s10, va_fc10) = va_lemma_Pextrq (va_hd va_b8) va_s8 (va_op_dst_opr64_reg64 rRdx) x1 1 in let va_b10 = va_tl va_b8 in let (tmp2:nat64) = va_get_reg64 rRdx va_s10 in let (va_s12, va_fc12) = va_lemma_Nat64Equal (va_hd va_b10) va_s10 (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx) in let va_b12 = va_tl va_b10 in let (va_s13, va_fc13) = va_lemma_Add64 (va_hd va_b12) va_s12 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx) in let va_b13 = va_tl va_b12 in Vale.Arch.Types.lemma_equality_check_helper_2 (va_eval_xmm va_old_s x1) (va_eval_xmm va_old_s x2) (va_eval_xmm va_s13 x1) tmp1 result1 tmp2 (va_get_reg64 rRdx va_s13) (va_get_reg64 rRax va_s13); let (va_sM, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_f12 = va_lemma_merge_total va_b12 va_s12 va_fc13 va_s13 va_f13 va_sM in let va_f10 = va_lemma_merge_total va_b10 va_s10 va_fc12 va_s12 va_f12 va_sM in let va_f8 = va_lemma_merge_total va_b8 va_s8 va_fc10 va_s10 va_f10 va_sM in let va_f5 = va_lemma_merge_total va_b5 va_s5 va_fc8 va_s8 va_f8 va_sM in let va_f4 = va_lemma_merge_total va_b4 va_s4 va_fc5 va_s5 va_f5 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc4 va_s4 va_f4 va_sM in (va_sM, va_fM)
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
x1: Vale.X64.Decls.va_operand_xmm -> x2: Vale.X64.Decls.va_operand_xmm -> 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_operand_xmm", "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.rRax", "Vale.X64.Machine_s.rRdx", "Vale.X64.QuickCode.va_mod_xmm", "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_update_operand_xmm", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.InsVector.va_lemma_XmmEqual", "Vale.X64.InsVector.va_code_XmmEqual" ]
[]
false
false
false
false
false
let va_wpProof_XmmEqual x1 x2 va_s0 va_k =
let va_sM, va_f0 = va_lemma_XmmEqual (va_code_XmmEqual x1 x2) va_s0 x1 x2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_operand_xmm x1 va_sM va_s0)))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_mod_xmm x1]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
false
FStar.PropositionalExtensionality.fst
FStar.PropositionalExtensionality.apply
val apply (p1 p2: prop) : Lemma (ensures ((p1 <==> p2) <==> (p1 == p2)))
val apply (p1 p2: prop) : Lemma (ensures ((p1 <==> p2) <==> (p1 == p2)))
let apply (p1 p2:prop) : Lemma (ensures ((p1 <==> p2) <==> (p1 == p2))) = axiom ()
{ "file_name": "ulib/FStar.PropositionalExtensionality.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 12, "end_line": 42, "start_col": 0, "start_line": 40 }
(* Copyright 2008-2018 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 FStar.PropositionalExtensionality (* * * The propositional extensionality axiom asserts the equality of * equisatisfiable propositions. * * The formulation of this axiom is (clearly) tied closely to the * precise definition of `prop`. * * `Prims.prop` is defined as the type of all subtypes of `unit`, * including, e.g., `squash t`, for all `t`. * * Note, we have considered several other plausible definitions of * `prop`, but some of which are actually inconsistent with this * axiom. See, for instance, * examples/paradoxes/PropositionalExtensionalityInconsistent.fst. * *) assume val axiom (_:unit) : Lemma (forall (p1 p2:prop). (p1 <==> p2) <==> (p1 == p2))
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.PropositionalExtensionality.fst" }
[ { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "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
p1: Prims.prop -> p2: Prims.prop -> FStar.Pervasives.Lemma (ensures (p1 <==> p2) <==> p1 == p2)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.prop", "FStar.PropositionalExtensionality.axiom", "Prims.unit", "Prims.l_True", "Prims.squash", "Prims.l_iff", "Prims.eq2", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
true
false
true
false
false
let apply (p1 p2: prop) : Lemma (ensures ((p1 <==> p2) <==> (p1 == p2))) =
axiom ()
false
Vale.Wrapper.X64.GCMencryptOpt.fsti
Vale.Wrapper.X64.GCMencryptOpt.uint64
val uint64 : Prims.eqtype
let uint64 = UInt64.t
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCMencryptOpt.fsti", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 21, "end_line": 28, "start_col": 0, "start_line": 28 }
module Vale.Wrapper.X64.GCMencryptOpt val z3rlimit_hack (x:nat) : squash (x < x + x + 1) #reset-options "--z3rlimit 50" open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open Vale.AsLowStar.MemoryHelpers open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.Def.Types_s open Vale.AES.GCM_helpers open Vale.AES.AES_s open Vale.AES.GCM_s open Vale.AES.GHash_s open Vale.AES.GCTR_s open Vale.AES.GCTR open Vale.Interop.Base open Vale.Arch.Types open Vale.AES.OptPublic
{ "checked_file": "/", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AsLowStar.MemoryHelpers.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.AES.OptPublic.fsti.checked", "Vale.AES.GHash_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.GCM_s.fst.checked", "Vale.AES.GCM_helpers.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.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.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCMencryptOpt.fsti" }
[ { "abbrev": false, "full_module": "Vale.AES.OptPublic", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GHash_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.AsLowStar.MemoryHelpers", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
Prims.eqtype
Prims.Tot
[ "total" ]
[]
[ "FStar.UInt64.t" ]
[]
false
false
false
true
false
let uint64 =
UInt64.t
false
Vale.X64.InsVector.fst
Vale.X64.InsVector.va_lemma_XmmEqual
val va_lemma_XmmEqual : va_b0:va_code -> va_s0:va_state -> x1:va_operand_xmm -> x2:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_XmmEqual x1 x2) va_s0 /\ va_is_dst_xmm x1 va_s0 /\ va_is_src_xmm x2 va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (if (va_eval_xmm va_s0 x1 = va_eval_xmm va_s0 x2) then (va_get_reg64 rRax va_sM = 0) else (va_get_reg64 rRax va_sM > 0)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_operand_xmm x1 va_sM va_s0)))))))
val va_lemma_XmmEqual : va_b0:va_code -> va_s0:va_state -> x1:va_operand_xmm -> x2:va_operand_xmm -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_XmmEqual x1 x2) va_s0 /\ va_is_dst_xmm x1 va_s0 /\ va_is_src_xmm x2 va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (if (va_eval_xmm va_s0 x1 = va_eval_xmm va_s0 x2) then (va_get_reg64 rRax va_sM = 0) else (va_get_reg64 rRax va_sM > 0)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_operand_xmm x1 va_sM va_s0)))))))
let va_lemma_XmmEqual va_b0 va_s0 x1 x2 = va_reveal_opaque (`%va_code_XmmEqual) (va_code_XmmEqual x1 x2); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s4, va_fc4) = va_lemma_Pcmpeqd (va_hd va_b1) va_s0 x1 x2 in let va_b4 = va_tl va_b1 in let (va_s5, va_fc5) = va_lemma_Pextrq (va_hd va_b4) va_s4 (va_op_dst_opr64_reg64 rRdx) x1 0 in let va_b5 = va_tl va_b4 in let (tmp1:nat64) = va_get_reg64 rRdx va_s5 in Vale.Arch.Types.lemma_equality_check_helper (va_eval_xmm va_s5 x1); let (va_s8, va_fc8) = va_lemma_Nat64Equal (va_hd va_b5) va_s5 (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx) in let va_b8 = va_tl va_b5 in let (result1:nat64) = va_get_reg64 rRax va_s8 in let (va_s10, va_fc10) = va_lemma_Pextrq (va_hd va_b8) va_s8 (va_op_dst_opr64_reg64 rRdx) x1 1 in let va_b10 = va_tl va_b8 in let (tmp2:nat64) = va_get_reg64 rRdx va_s10 in let (va_s12, va_fc12) = va_lemma_Nat64Equal (va_hd va_b10) va_s10 (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx) in let va_b12 = va_tl va_b10 in let (va_s13, va_fc13) = va_lemma_Add64 (va_hd va_b12) va_s12 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx) in let va_b13 = va_tl va_b12 in Vale.Arch.Types.lemma_equality_check_helper_2 (va_eval_xmm va_old_s x1) (va_eval_xmm va_old_s x2) (va_eval_xmm va_s13 x1) tmp1 result1 tmp2 (va_get_reg64 rRdx va_s13) (va_get_reg64 rRax va_s13); let (va_sM, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_f12 = va_lemma_merge_total va_b12 va_s12 va_fc13 va_s13 va_f13 va_sM in let va_f10 = va_lemma_merge_total va_b10 va_s10 va_fc12 va_s12 va_f12 va_sM in let va_f8 = va_lemma_merge_total va_b8 va_s8 va_fc10 va_s10 va_f10 va_sM in let va_f5 = va_lemma_merge_total va_b5 va_s5 va_fc8 va_s8 va_f8 va_sM in let va_f4 = va_lemma_merge_total va_b4 va_s4 va_fc5 va_s5 va_f5 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc4 va_s4 va_f4 va_sM in (va_sM, va_fM)
{ "file_name": "obj/Vale.X64.InsVector.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 1395, "start_col": 0, "start_line": 1363 }
module Vale.X64.InsVector open Vale.Def.Opaque_s open Vale.X64 open Vale.X64.StateLemmas open Vale.X64.InsLemmas open Vale.X64.Taint_Semantics open Vale.X64.Memory open Vale.X64.Stack_i module I = Vale.X64.Instructions_s module S = Vale.X64.Machine_Semantics_s friend Vale.X64.Decls #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- Mem128_in //-- //-- Mem128_lemma [@ "opaque_to_smt"] let va_code_Mem128_lemma () = (va_Block (va_CNil ())) [@ "opaque_to_smt"] let va_codegen_success_Mem128_lemma () = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mem128_lemma va_b0 va_s0 h base offset t b index = va_reveal_opaque (`%va_code_Mem128_lemma) (va_code_Mem128_lemma ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let heap_h = va_get_mem_heaplet h va_s0 in lemma_opr_Mem128 h va_s0 base offset t b index; let (va_sM, va_fM) = va_lemma_empty_total va_s0 va_b1 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mem128_lemma h base offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mem128_lemma (va_code_Mem128_lemma ()) va_s0 h base offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM va_s0)); va_lemma_norm_mods ([]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Paddd [@ "opaque_to_smt"] let va_code_Paddd dst src = (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Paddd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Paddd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Paddd) (va_code_Paddd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Paddd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Paddd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Paddd (va_code_Paddd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPaddd [@ "opaque_to_smt"] let va_code_VPaddd dst src1 src2 = (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPaddd dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPaddd va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPaddd) (va_code_VPaddd dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPaddd) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPaddd dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPaddd (va_code_VPaddd dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pxor [@ "opaque_to_smt"] let va_code_Pxor dst src = (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pxor dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pxor va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pxor) (va_code_Pxor dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Pxor) (S.AnnotatePxor ()) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pxor dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pxor (va_code_Pxor dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 4 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pand [@ "opaque_to_smt"] let va_code_Pand dst src = (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pand dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pand va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pand) (va_code_Pand dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pand) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pand dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pand (va_code_Pand dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPxor [@ "opaque_to_smt"] let va_code_VPxor dst src1 src2 = (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) [@ "opaque_to_smt"] let va_codegen_success_VPxor dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPxor va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPxor) (va_code_VPxor dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_VPxor) (S.AnnotateVPxor ()) (OReg dst) (OReg src1) src2)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPxor dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPxor (va_code_VPxor dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pslld [@ "opaque_to_smt"] let va_code_Pslld dst amt = (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Pslld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pslld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Pslld) (va_code_Pslld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pslld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pslld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pslld (va_code_Pslld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrld [@ "opaque_to_smt"] let va_code_Psrld dst amt = (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) [@ "opaque_to_smt"] let va_codegen_success_Psrld dst amt = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Psrld va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrld) (va_code_Psrld dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrld amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Psrld dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrld (va_code_Psrld dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Psrldq val va_code_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_code [@ "opaque_to_smt"] let va_code_Psrldq dst amt = (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) val va_codegen_success_Psrldq : dst:va_operand_xmm -> amt:int -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Psrldq dst amt = (va_ttrue ()) val va_lemma_Psrldq : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> amt:int -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Psrldq dst amt) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@"opaque_to_smt"] let va_lemma_Psrldq va_b0 va_s0 dst amt = va_reveal_opaque (`%va_code_Psrldq) (va_code_Psrldq dst amt); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Psrldq amt) (OReg dst))) va_s0 in (va_sM, va_fM) [@ va_qattr] let va_wp_Psrldq (dst:va_operand_xmm) (amt:int) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (0 <= amt /\ amt < 16) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ (let src_bytes = Vale.Def.Types_s.le_quad32_to_bytes (va_eval_xmm va_s0 dst) in let zero_pad = FStar.Seq.Base.create #nat8 amt 0 in let remaining_bytes = FStar.Seq.Base.slice #Vale.Def.Types_s.nat8 src_bytes amt (FStar.Seq.Base.length #Vale.Def.Types_s.nat8 src_bytes) in va_eval_xmm va_sM dst == Vale.Def.Types_s.le_bytes_to_quad32 (FStar.Seq.Base.append #nat8 zero_pad remaining_bytes)) ==> va_k va_sM (()))) val va_wpProof_Psrldq : dst:va_operand_xmm -> amt:int -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Psrldq dst amt va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Psrldq dst amt) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Psrldq dst amt va_s0 va_k = let (va_sM, va_f0) = va_lemma_Psrldq (va_code_Psrldq dst amt) va_s0 dst amt in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Psrldq (dst:va_operand_xmm) (amt:int) : (va_quickCode unit (va_code_Psrldq dst amt)) = (va_QProc (va_code_Psrldq dst amt) ([va_mod_xmm dst]) (va_wp_Psrldq dst amt) (va_wpProof_Psrldq dst amt)) //-- //-- Palignr4 [@ "opaque_to_smt"] let va_code_Palignr4 dst src = (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr4) (va_code_Palignr4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr4 (va_code_Palignr4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Palignr8 [@ "opaque_to_smt"] let va_code_Palignr8 dst src = (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Palignr8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Palignr8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Palignr8) (va_code_Palignr8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Palignr 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Palignr8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Palignr8 (va_code_Palignr8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPalignr8 [@ "opaque_to_smt"] let va_code_VPalignr8 dst src1 src2 = (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPalignr8 dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPalignr8 va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPalignr8) (va_code_VPalignr8 dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPalignr 8) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPalignr8 dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPalignr8 (va_code_VPalignr8 dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Shufpd [@ "opaque_to_smt"] let va_code_Shufpd dst src permutation = (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Shufpd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Shufpd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Shufpd) (va_code_Shufpd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Shufpd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Shufpd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Shufpd (va_code_Shufpd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VShufpd [@ "opaque_to_smt"] let va_code_VShufpd dst src1 src2 permutation = (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VShufpd dst src1 src2 permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VShufpd va_b0 va_s0 dst src1 src2 permutation = va_reveal_opaque (`%va_code_VShufpd) (va_code_VShufpd dst src1 src2 permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VShufpd permutation) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VShufpd dst src1 src2 permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_VShufpd (va_code_VShufpd dst src1 src2 permutation) va_s0 dst src1 src2 permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb [@ "opaque_to_smt"] let va_code_Pshufb dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb) (va_code_Pshufb dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb (va_code_Pshufb dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- VPshufb [@ "opaque_to_smt"] let va_code_VPshufb dst src1 src2 = (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) [@ "opaque_to_smt"] let va_codegen_success_VPshufb dst src1 src2 = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPshufb va_b0 va_s0 dst src1 src2 = va_reveal_opaque (`%va_code_VPshufb) (va_code_VPshufb dst src1 src2); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPshufb) (OReg dst) (OReg src1) (OReg src2))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPshufb dst src1 src2 va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPshufb (va_code_VPshufb dst src1 src2) va_s0 dst src1 src2 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbStable [@ "opaque_to_smt"] let va_code_PshufbStable dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbStable dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbStable va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbStable) (va_code_PshufbStable dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbStable dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbStable (va_code_PshufbStable dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PshufbDup [@ "opaque_to_smt"] let va_code_PshufbDup dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_PshufbDup dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_PshufbDup va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_PshufbDup) (va_code_PshufbDup dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PshufbDup dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_PshufbDup (va_code_PshufbDup dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufb64 [@ "opaque_to_smt"] let va_code_Pshufb64 dst src = (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufb64 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufb64 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pshufb64) (va_code_Pshufb64 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufb) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufb64 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufb64 (va_code_Pshufb64 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pshufd [@ "opaque_to_smt"] let va_code_Pshufd dst src permutation = (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pshufd dst src permutation = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pshufd va_b0 va_s0 dst src permutation = va_reveal_opaque (`%va_code_Pshufd) (va_code_Pshufd dst src permutation); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pshufd permutation) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pshufd dst src permutation va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pshufd (va_code_Pshufd dst src permutation) va_s0 dst src permutation in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pcmpeqd [@ "opaque_to_smt"] let va_code_Pcmpeqd dst src = (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pcmpeqd dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pcmpeqd va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Pcmpeqd) (va_code_Pcmpeqd dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pcmpeqd) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pcmpeqd dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pcmpeqd (va_code_Pcmpeqd dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pextrq [@ "opaque_to_smt"] let va_code_Pextrq dst src index = (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Pextrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pextrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pextrq) (va_code_Pextrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pextrq index) dst (OReg src))) va_s0 in Vale.Arch.Types.lo64_reveal (); Vale.Arch.Types.hi64_reveal (); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pextrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pextrq (va_code_Pextrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_dst_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_dst_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Pinsrd [@ "opaque_to_smt"] let va_code_Pinsrd dst src index = (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrd dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrd va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrd) (va_code_Pinsrd dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrd index) (OReg dst) src)) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrd dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrd (va_code_Pinsrd dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrdImm [@ "opaque_to_smt"] let va_code_PinsrdImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrdImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrd dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrdImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrdImm) (va_code_PinsrdImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrd (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrdImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrdImm (va_code_PinsrdImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 3 --z3rlimit 50" //-- Pinsrq [@ "opaque_to_smt"] let va_code_Pinsrq dst src index = (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) [@ "opaque_to_smt"] let va_codegen_success_Pinsrq dst src index = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Pinsrq va_b0 va_s0 dst src index = va_reveal_opaque (`%va_code_Pinsrq) (va_code_Pinsrq dst src index); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Pinsrq index) (OReg dst) src)) va_s0 in Vale.Def.Types_s.insert_nat64_reveal (); assert (va_eval_xmm va_sM dst == Vale.Def.Types_s.insert_nat64_def (va_eval_xmm va_old_s dst) (va_eval_opr64 va_sM src) index); (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Pinsrq dst src index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Pinsrq (va_code_Pinsrq dst src index) va_s0 dst src index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- PinsrqImm [@ "opaque_to_smt"] let va_code_PinsrqImm dst immediate index tmp = (va_Block (va_CCons (va_code_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_CCons (va_code_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_PinsrqImm dst immediate index tmp = (va_pbool_and (va_codegen_success_Mov64 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate)) (va_pbool_and (va_codegen_success_Pinsrq dst (va_coerce_reg_opr64_to_opr64 tmp) index) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_PinsrqImm va_b0 va_s0 dst immediate index tmp = va_reveal_opaque (`%va_code_PinsrqImm) (va_code_PinsrqImm dst immediate index tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Mov64 (va_hd va_b1) va_s0 (va_coerce_reg_opr64_to_dst_opr64 tmp) (va_const_opr64 immediate) in let va_b2 = va_tl va_b1 in let (va_s3, va_fc3) = va_lemma_Pinsrq (va_hd va_b2) va_s2 dst (va_coerce_reg_opr64_to_opr64 tmp) index in let va_b3 = va_tl va_b2 in let (va_sM, va_f3) = va_lemma_empty_total va_s3 va_b3 in let va_f2 = va_lemma_merge_total va_b2 va_s2 va_fc3 va_s3 va_f3 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_PinsrqImm dst immediate index tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_PinsrqImm (va_code_PinsrqImm dst immediate index tmp) va_s0 dst immediate index tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- #reset-options "--initial_fuel 2 --max_fuel 4 --max_ifuel 2 --z3rlimit 50" //-- VPslldq4 [@ "opaque_to_smt"] let va_code_VPslldq4 dst src = (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_VPslldq4 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_VPslldq4 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_VPslldq4) (va_code_VPslldq4 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 4) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_VPslldq4 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_VPslldq4 (va_code_VPslldq4 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpslldq8 [@ "opaque_to_smt"] let va_code_Vpslldq8 dst src = (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpslldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpslldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpslldq8) (va_code_Vpslldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPslldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpslldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpslldq8 (va_code_Vpslldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Vpsrldq8 [@ "opaque_to_smt"] let va_code_Vpsrldq8 dst src = (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Vpsrldq8 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Vpsrldq8 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Vpsrldq8) (va_code_Vpsrldq8 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_VPsrldq 8) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Vpsrldq8 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Vpsrldq8 (va_code_Vpsrldq8 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Mov128 [@ "opaque_to_smt"] let va_code_Mov128 dst src = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Mov128 dst src = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Mov128 va_b0 va_s0 dst src = va_reveal_opaque (`%va_code_Mov128) (va_code_Mov128 dst src); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OReg src))) va_s0 in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Mov128 dst src va_s0 va_k = let (va_sM, va_f0) = va_lemma_Mov128 (va_code_Mov128 dst src) va_s0 dst src in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Load128_buffer [@ "opaque_to_smt"] let va_code_Load128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_Load128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Load128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Load128_buffer) (va_code_Load128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OReg dst) (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_full b index (va_sM.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Load128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Load128_buffer (va_code_Load128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- LoadBe64_buffer128 [@ "opaque_to_smt"] let va_code_LoadBe64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) [@ "opaque_to_smt"] let va_codegen_success_LoadBe64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_LoadBe64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_LoadBe64_buffer128) (va_code_LoadBe64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_MovBe64) (S.AnnotateMovbe64 ()) dst (OMem ((MReg (get_reg src) offset, t))))) va_s0 in Vale.X64.Memory_Sems.low_lemma_load_mem128_lo_hi_full b index (va_sM.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_load_mem128_lo64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory_Sems.low_lemma_load_mem128_hi64 b index (va_sM.vs_heap.vf_heap); Vale.X64.Memory.lemma_valid_taint128 b ((va_get_mem_layout va_sM).vl_taint) (va_sM.vs_heap.vf_heap) index t; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_LoadBe64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_LoadBe64_buffer128 (va_code_LoadBe64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 dst va_sM va_s0))); va_lemma_norm_mods ([va_mod_reg_opr64 dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store128_buffer [@ "opaque_to_smt"] let va_code_Store128_buffer h dst src offset t = (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) [@ "opaque_to_smt"] let va_codegen_success_Store128_buffer h dst src offset t = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store128_buffer va_b0 va_s0 h dst src offset t b index = va_reveal_opaque (`%va_code_Store128_buffer) (va_code_Store128_buffer h dst src offset t); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr (I.ins_Movdqu) (OMem ((MReg (get_reg dst) offset, t))) (OReg src))) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_full b index (va_eval_xmm va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store128_buffer h dst src offset t b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store128_buffer (va_code_Store128_buffer h dst src offset t) va_s0 h dst src offset t b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- Store64_buffer128 [@ "opaque_to_smt"] let va_code_Store64_buffer128 h dst src offset t upper = (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) [@ "opaque_to_smt"] let va_codegen_success_Store64_buffer128 h dst src offset t upper = (va_ttrue ()) [@"opaque_to_smt"] let va_lemma_Store64_buffer128 va_b0 va_s0 h dst src offset t upper b index = va_reveal_opaque (`%va_code_Store64_buffer128) (va_code_Store64_buffer128 h dst src offset t upper); let (va_old_s:va_state) = va_s0 in va_ins_lemma (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0; let (va_sM, va_fM) = va_eval_ins (mk_ins (make_instr_annotate (I.ins_Mov64) (S.AnnotateMov64 ()) (OMem ((MReg (get_reg dst) offset, t))) src)) va_s0 in Vale.X64.Memory_Sems.low_lemma_store_mem128_lo64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; Vale.X64.Memory_Sems.low_lemma_store_mem128_hi64_full b index (va_eval_reg_opr64 va_old_s src) (va_old_s.vs_heap) t h; (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_Store64_buffer128 h dst src offset t upper b index va_s0 va_k = let (va_sM, va_f0) = va_lemma_Store64_buffer128 (va_code_Store64_buffer128 h dst src offset t upper) va_s0 h dst src offset t upper b index in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_mem va_sM (va_update_ok va_sM (va_update_operand_heaplet h va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_mem; va_mod_heaplet h]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- ZeroXmm [@ "opaque_to_smt"] let va_code_ZeroXmm dst = (va_Block (va_CCons (va_code_Pxor dst dst) (va_CNil ()))) [@ "opaque_to_smt"] let va_codegen_success_ZeroXmm dst = (va_pbool_and (va_codegen_success_Pxor dst dst) (va_ttrue ())) [@"opaque_to_smt"] let va_lemma_ZeroXmm va_b0 va_s0 dst = va_reveal_opaque (`%va_code_ZeroXmm) (va_code_ZeroXmm dst); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s2, va_fc2) = va_lemma_Pxor (va_hd va_b1) va_s0 dst dst in let va_b2 = va_tl va_b1 in Vale.Arch.Types.lemma_quad32_xor (); let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_ZeroXmm dst va_s0 va_k = let (va_sM, va_f0) = va_lemma_ZeroXmm (va_code_ZeroXmm dst) va_s0 dst in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))); va_lemma_norm_mods ([va_Mod_flags; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbMask [@ "opaque_to_smt"] let va_code_InitPshufbMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 283686952306183 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbMask) (va_code_InitPshufbMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 283686952306183 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbMask (va_code_InitPshufbMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbStableMask [@ "opaque_to_smt"] let va_code_InitPshufbStableMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 289644378169868803 0 tmp) (va_CCons (va_code_PinsrqImm dst 868365760874482187 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbStableMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 289644378169868803 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 868365760874482187 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbStableMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbStableMask) (va_code_InitPshufbStableMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 289644378169868803 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 868365760874482187 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbStableMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbStableMask (va_code_InitPshufbStableMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufbDupMask [@ "opaque_to_smt"] let va_code_InitPshufbDupMask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 579005069656919567 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufbDupMask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufbDupMask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufbDupMask) (va_code_InitPshufbDupMask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 579005069656919567 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufbDupMask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufbDupMask (va_code_InitPshufbDupMask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- InitPshufb64Mask [@ "opaque_to_smt"] let va_code_InitPshufb64Mask dst tmp = (va_Block (va_CCons (va_code_PinsrqImm dst 283686952306183 0 tmp) (va_CCons (va_code_PinsrqImm dst 579005069656919567 1 tmp) (va_CNil ())))) [@ "opaque_to_smt"] let va_codegen_success_InitPshufb64Mask dst tmp = (va_pbool_and (va_codegen_success_PinsrqImm dst 283686952306183 0 tmp) (va_pbool_and (va_codegen_success_PinsrqImm dst 579005069656919567 1 tmp) (va_ttrue ()))) [@"opaque_to_smt"] let va_lemma_InitPshufb64Mask va_b0 va_s0 dst tmp = va_reveal_opaque (`%va_code_InitPshufb64Mask) (va_code_InitPshufb64Mask dst tmp); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in Vale.Arch.Types.lemma_nat_to_two32 (); let (va_s3, va_fc3) = va_lemma_PinsrqImm (va_hd va_b1) va_s0 dst 283686952306183 0 tmp in let va_b3 = va_tl va_b1 in let (va_s4, va_fc4) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 579005069656919567 1 tmp in let va_b4 = va_tl va_b3 in Vale.Def.Types_s.insert_nat64_reveal (); let (va_sM, va_f4) = va_lemma_empty_total va_s4 va_b4 in let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc4 va_s4 va_f4 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in (va_sM, va_fM) [@"opaque_to_smt"] let va_wpProof_InitPshufb64Mask dst tmp va_s0 va_k = let (va_sM, va_f0) = va_lemma_InitPshufb64Mask (va_code_InitPshufb64Mask dst tmp) va_s0 dst tmp in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_ok va_sM (va_update_operand_reg_opr64 tmp va_sM (va_update_operand_xmm dst va_sM va_s0))))); va_lemma_norm_mods ([va_Mod_flags; va_mod_reg_opr64 tmp; va_mod_xmm dst]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) //-- //-- XmmEqual [@ "opaque_to_smt"] let va_code_XmmEqual x1 x2 = (va_Block (va_CCons (va_code_Pcmpeqd x1 x2) (va_CCons (va_code_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 0) (va_CCons (va_code_Nat64Equal (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx)) (va_CCons (va_code_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 1) (va_CCons (va_code_Nat64Equal (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx)) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CNil ())))))))) [@ "opaque_to_smt"] let va_codegen_success_XmmEqual x1 x2 = (va_pbool_and (va_codegen_success_Pcmpeqd x1 x2) (va_pbool_and (va_codegen_success_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 0) (va_pbool_and (va_codegen_success_Nat64Equal (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Pextrq (va_op_dst_opr64_reg64 rRdx) x1 1) (va_pbool_and (va_codegen_success_Nat64Equal (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_ttrue ())))))))
{ "checked_file": "/", "dependencies": [ "Vale.X64.Taint_Semantics.fst.checked", "Vale.X64.StateLemmas.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Memory_Sems.fsti.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_Semantics_s.fst.checked", "Vale.X64.Instructions_s.fsti.checked", "Vale.X64.InsLemmas.fsti.checked", "Vale.X64.Decls.fst.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "prims.fst.checked", "FStar.Seq.Base.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.X64.InsVector.fst" }
[ { "abbrev": true, "full_module": "Vale.X64.Machine_Semantics_s", "short_module": "S" }, { "abbrev": true, "full_module": "Vale.X64.Instructions_s", "short_module": "I" }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Taint_Semantics", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.StateLemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "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.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "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.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapTypes_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.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.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": 4, "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": 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": 50, "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 -> x1: Vale.X64.Decls.va_operand_xmm -> x2: Vale.X64.Decls.va_operand_xmm -> 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.Decls.va_operand_xmm", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_lemma_merge_total", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_lemma_empty_total", "Prims.unit", "Vale.Arch.Types.lemma_equality_check_helper_2", "Vale.X64.Decls.va_eval_xmm", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRax", "Prims.list", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_tl", "Vale.X64.InsBasic.va_lemma_Add64", "Vale.X64.Decls.va_hd", "Vale.X64.Decls.va_op_dst_opr64_reg64", "Vale.X64.Decls.va_op_opr64_reg64", "Vale.X64.InsBasic.va_lemma_Nat64Equal", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.Def.Words_s.nat64", "Vale.X64.InsVector.va_lemma_Pextrq", "Vale.Arch.Types.lemma_equality_check_helper", "Vale.X64.InsVector.va_lemma_Pcmpeqd", "Vale.X64.Decls.va_get_block", "Vale.X64.Decls.va_reveal_opaque", "Vale.X64.InsVector.va_code_XmmEqual" ]
[]
false
false
false
false
false
let va_lemma_XmmEqual va_b0 va_s0 x1 x2 =
va_reveal_opaque (`%va_code_XmmEqual) (va_code_XmmEqual x1 x2); let va_old_s:va_state = va_s0 in let va_b1:va_codes = va_get_block va_b0 in let va_s4, va_fc4 = va_lemma_Pcmpeqd (va_hd va_b1) va_s0 x1 x2 in let va_b4 = va_tl va_b1 in let va_s5, va_fc5 = va_lemma_Pextrq (va_hd va_b4) va_s4 (va_op_dst_opr64_reg64 rRdx) x1 0 in let va_b5 = va_tl va_b4 in let tmp1:nat64 = va_get_reg64 rRdx va_s5 in Vale.Arch.Types.lemma_equality_check_helper (va_eval_xmm va_s5 x1); let va_s8, va_fc8 = va_lemma_Nat64Equal (va_hd va_b5) va_s5 (va_op_reg_opr64_reg64 rRax) (va_op_reg_opr64_reg64 rRdx) in let va_b8 = va_tl va_b5 in let result1:nat64 = va_get_reg64 rRax va_s8 in let va_s10, va_fc10 = va_lemma_Pextrq (va_hd va_b8) va_s8 (va_op_dst_opr64_reg64 rRdx) x1 1 in let va_b10 = va_tl va_b8 in let tmp2:nat64 = va_get_reg64 rRdx va_s10 in let va_s12, va_fc12 = va_lemma_Nat64Equal (va_hd va_b10) va_s10 (va_op_reg_opr64_reg64 rRdx) (va_op_reg_opr64_reg64 rRdx) in let va_b12 = va_tl va_b10 in let va_s13, va_fc13 = va_lemma_Add64 (va_hd va_b12) va_s12 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx) in let va_b13 = va_tl va_b12 in Vale.Arch.Types.lemma_equality_check_helper_2 (va_eval_xmm va_old_s x1) (va_eval_xmm va_old_s x2) (va_eval_xmm va_s13 x1) tmp1 result1 tmp2 (va_get_reg64 rRdx va_s13) (va_get_reg64 rRax va_s13); let va_sM, va_f13 = va_lemma_empty_total va_s13 va_b13 in let va_f12 = va_lemma_merge_total va_b12 va_s12 va_fc13 va_s13 va_f13 va_sM in let va_f10 = va_lemma_merge_total va_b10 va_s10 va_fc12 va_s12 va_f12 va_sM in let va_f8 = va_lemma_merge_total va_b8 va_s8 va_fc10 va_s10 va_f10 va_sM in let va_f5 = va_lemma_merge_total va_b5 va_s5 va_fc8 va_s8 va_f8 va_sM in let va_f4 = va_lemma_merge_total va_b4 va_s4 va_fc5 va_s5 va_f5 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc4 va_s4 va_f4 va_sM in (va_sM, va_fM)
false
Vale.Wrapper.X64.GCMencryptOpt.fsti
Vale.Wrapper.X64.GCMencryptOpt.uint8_p
val uint8_p : Type0
let uint8_p = B.buffer UInt8.t
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCMencryptOpt.fsti", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 30, "end_line": 27, "start_col": 0, "start_line": 27 }
module Vale.Wrapper.X64.GCMencryptOpt val z3rlimit_hack (x:nat) : squash (x < x + x + 1) #reset-options "--z3rlimit 50" open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open Vale.AsLowStar.MemoryHelpers open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.Def.Types_s open Vale.AES.GCM_helpers open Vale.AES.AES_s open Vale.AES.GCM_s open Vale.AES.GHash_s open Vale.AES.GCTR_s open Vale.AES.GCTR open Vale.Interop.Base open Vale.Arch.Types open Vale.AES.OptPublic
{ "checked_file": "/", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AsLowStar.MemoryHelpers.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.AES.OptPublic.fsti.checked", "Vale.AES.GHash_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.GCM_s.fst.checked", "Vale.AES.GCM_helpers.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.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.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCMencryptOpt.fsti" }
[ { "abbrev": false, "full_module": "Vale.AES.OptPublic", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GHash_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.AsLowStar.MemoryHelpers", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
Type0
Prims.Tot
[ "total" ]
[]
[ "LowStar.Buffer.buffer", "FStar.UInt8.t" ]
[]
false
false
false
true
true
let uint8_p =
B.buffer UInt8.t
false
Vale.Wrapper.X64.GCMencryptOpt.fsti
Vale.Wrapper.X64.GCMencryptOpt.disjoint_or_eq
val disjoint_or_eq : b1: Vale.Wrapper.X64.GCMencryptOpt.uint8_p -> b2: Vale.Wrapper.X64.GCMencryptOpt.uint8_p -> Prims.logical
let disjoint_or_eq (b1 b2:uint8_p) = B.disjoint b1 b2 \/ b1 == b2
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCMencryptOpt.fsti", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 65, "end_line": 30, "start_col": 0, "start_line": 30 }
module Vale.Wrapper.X64.GCMencryptOpt val z3rlimit_hack (x:nat) : squash (x < x + x + 1) #reset-options "--z3rlimit 50" open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open Vale.AsLowStar.MemoryHelpers open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.Def.Types_s open Vale.AES.GCM_helpers open Vale.AES.AES_s open Vale.AES.GCM_s open Vale.AES.GHash_s open Vale.AES.GCTR_s open Vale.AES.GCTR open Vale.Interop.Base open Vale.Arch.Types open Vale.AES.OptPublic let uint8_p = B.buffer UInt8.t let uint64 = UInt64.t
{ "checked_file": "/", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AsLowStar.MemoryHelpers.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.AES.OptPublic.fsti.checked", "Vale.AES.GHash_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.GCM_s.fst.checked", "Vale.AES.GCM_helpers.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.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.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCMencryptOpt.fsti" }
[ { "abbrev": false, "full_module": "Vale.AES.OptPublic", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GHash_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.AsLowStar.MemoryHelpers", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
b1: Vale.Wrapper.X64.GCMencryptOpt.uint8_p -> b2: Vale.Wrapper.X64.GCMencryptOpt.uint8_p -> Prims.logical
Prims.Tot
[ "total" ]
[]
[ "Vale.Wrapper.X64.GCMencryptOpt.uint8_p", "Prims.l_or", "LowStar.Monotonic.Buffer.disjoint", "FStar.UInt8.t", "LowStar.Buffer.trivial_preorder", "Prims.eq2", "Prims.logical" ]
[]
false
false
false
true
true
let disjoint_or_eq (b1 b2: uint8_p) =
B.disjoint b1 b2 \/ b1 == b2
false
Vale.Wrapper.X64.GCMencryptOpt.fsti
Vale.Wrapper.X64.GCMencryptOpt.length_aux2
val length_aux2 (b: uint8_p) : Lemma (requires B.length b = 240) (ensures DV.length (get_downview b) % 16 = 0)
val length_aux2 (b: uint8_p) : Lemma (requires B.length b = 240) (ensures DV.length (get_downview b) % 16 = 0)
let length_aux2 (b:uint8_p) : Lemma (requires B.length b = 240) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCMencryptOpt.fsti", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 19, "end_line": 42, "start_col": 0, "start_line": 38 }
module Vale.Wrapper.X64.GCMencryptOpt val z3rlimit_hack (x:nat) : squash (x < x + x + 1) #reset-options "--z3rlimit 50" open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open Vale.AsLowStar.MemoryHelpers open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.Def.Types_s open Vale.AES.GCM_helpers open Vale.AES.AES_s open Vale.AES.GCM_s open Vale.AES.GHash_s open Vale.AES.GCTR_s open Vale.AES.GCTR open Vale.Interop.Base open Vale.Arch.Types open Vale.AES.OptPublic let uint8_p = B.buffer UInt8.t let uint64 = UInt64.t let disjoint_or_eq (b1 b2:uint8_p) = B.disjoint b1 b2 \/ b1 == b2 let length_aux (b:uint8_p) : Lemma (requires B.length b = 176) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db
{ "checked_file": "/", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AsLowStar.MemoryHelpers.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.AES.OptPublic.fsti.checked", "Vale.AES.GHash_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.GCM_s.fst.checked", "Vale.AES.GCM_helpers.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.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.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCMencryptOpt.fsti" }
[ { "abbrev": false, "full_module": "Vale.AES.OptPublic", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GHash_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.AsLowStar.MemoryHelpers", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
b: Vale.Wrapper.X64.GCMencryptOpt.uint8_p -> FStar.Pervasives.Lemma (requires LowStar.Monotonic.Buffer.length b = 240) (ensures LowStar.BufferView.Down.length (Vale.Interop.Types.get_downview b) % 16 = 0)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Vale.Wrapper.X64.GCMencryptOpt.uint8_p", "LowStar.BufferView.Down.length_eq", "FStar.UInt8.t", "LowStar.BufferView.Down.buffer", "Vale.Interop.Types.get_downview", "Vale.Arch.HeapTypes_s.TUInt8", "LowStar.Buffer.trivial_preorder", "Prims.unit", "Prims.b2t", "Prims.op_Equality", "Prims.int", "LowStar.Monotonic.Buffer.length", "Prims.squash", "Prims.op_Modulus", "LowStar.BufferView.Down.length", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
true
false
true
false
false
let length_aux2 (b: uint8_p) : Lemma (requires B.length b = 240) (ensures DV.length (get_downview b) % 16 = 0) =
let db = get_downview b in DV.length_eq db
false
Vale.Wrapper.X64.GCMencryptOpt.fsti
Vale.Wrapper.X64.GCMencryptOpt.length_aux
val length_aux (b: uint8_p) : Lemma (requires B.length b = 176) (ensures DV.length (get_downview b) % 16 = 0)
val length_aux (b: uint8_p) : Lemma (requires B.length b = 176) (ensures DV.length (get_downview b) % 16 = 0)
let length_aux (b:uint8_p) : Lemma (requires B.length b = 176) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCMencryptOpt.fsti", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 19, "end_line": 36, "start_col": 0, "start_line": 32 }
module Vale.Wrapper.X64.GCMencryptOpt val z3rlimit_hack (x:nat) : squash (x < x + x + 1) #reset-options "--z3rlimit 50" open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open Vale.AsLowStar.MemoryHelpers open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.Def.Types_s open Vale.AES.GCM_helpers open Vale.AES.AES_s open Vale.AES.GCM_s open Vale.AES.GHash_s open Vale.AES.GCTR_s open Vale.AES.GCTR open Vale.Interop.Base open Vale.Arch.Types open Vale.AES.OptPublic let uint8_p = B.buffer UInt8.t let uint64 = UInt64.t let disjoint_or_eq (b1 b2:uint8_p) = B.disjoint b1 b2 \/ b1 == b2
{ "checked_file": "/", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AsLowStar.MemoryHelpers.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.AES.OptPublic.fsti.checked", "Vale.AES.GHash_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.GCM_s.fst.checked", "Vale.AES.GCM_helpers.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.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.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCMencryptOpt.fsti" }
[ { "abbrev": false, "full_module": "Vale.AES.OptPublic", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GHash_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.AsLowStar.MemoryHelpers", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
b: Vale.Wrapper.X64.GCMencryptOpt.uint8_p -> FStar.Pervasives.Lemma (requires LowStar.Monotonic.Buffer.length b = 176) (ensures LowStar.BufferView.Down.length (Vale.Interop.Types.get_downview b) % 16 = 0)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Vale.Wrapper.X64.GCMencryptOpt.uint8_p", "LowStar.BufferView.Down.length_eq", "FStar.UInt8.t", "LowStar.BufferView.Down.buffer", "Vale.Interop.Types.get_downview", "Vale.Arch.HeapTypes_s.TUInt8", "LowStar.Buffer.trivial_preorder", "Prims.unit", "Prims.b2t", "Prims.op_Equality", "Prims.int", "LowStar.Monotonic.Buffer.length", "Prims.squash", "Prims.op_Modulus", "LowStar.BufferView.Down.length", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
true
false
true
false
false
let length_aux (b: uint8_p) : Lemma (requires B.length b = 176) (ensures DV.length (get_downview b) % 16 = 0) =
let db = get_downview b in DV.length_eq db
false
Vale.Wrapper.X64.GCMencryptOpt.fsti
Vale.Wrapper.X64.GCMencryptOpt.length_aux5
val length_aux5 (b: uint8_p) : Lemma (requires B.length b = 128) (ensures DV.length (get_downview b) % 16 = 0)
val length_aux5 (b: uint8_p) : Lemma (requires B.length b = 128) (ensures DV.length (get_downview b) % 16 = 0)
let length_aux5 (b:uint8_p) : Lemma (requires B.length b = 128) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCMencryptOpt.fsti", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 19, "end_line": 61, "start_col": 0, "start_line": 57 }
module Vale.Wrapper.X64.GCMencryptOpt val z3rlimit_hack (x:nat) : squash (x < x + x + 1) #reset-options "--z3rlimit 50" open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open Vale.AsLowStar.MemoryHelpers open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.Def.Types_s open Vale.AES.GCM_helpers open Vale.AES.AES_s open Vale.AES.GCM_s open Vale.AES.GHash_s open Vale.AES.GCTR_s open Vale.AES.GCTR open Vale.Interop.Base open Vale.Arch.Types open Vale.AES.OptPublic let uint8_p = B.buffer UInt8.t let uint64 = UInt64.t let disjoint_or_eq (b1 b2:uint8_p) = B.disjoint b1 b2 \/ b1 == b2 let length_aux (b:uint8_p) : Lemma (requires B.length b = 176) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db let length_aux2 (b:uint8_p) : Lemma (requires B.length b = 240) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db let length_aux3 (b:uint8_p) (n:nat) : Lemma (requires B.length b = 16 * n) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db; FStar.Math.Lemmas.cancel_mul_mod n 16 let length_aux4 (b:uint8_p) : Lemma (requires B.length b = 16) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db
{ "checked_file": "/", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AsLowStar.MemoryHelpers.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.AES.OptPublic.fsti.checked", "Vale.AES.GHash_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.GCM_s.fst.checked", "Vale.AES.GCM_helpers.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.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.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCMencryptOpt.fsti" }
[ { "abbrev": false, "full_module": "Vale.AES.OptPublic", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GHash_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.AsLowStar.MemoryHelpers", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
b: Vale.Wrapper.X64.GCMencryptOpt.uint8_p -> FStar.Pervasives.Lemma (requires LowStar.Monotonic.Buffer.length b = 128) (ensures LowStar.BufferView.Down.length (Vale.Interop.Types.get_downview b) % 16 = 0)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Vale.Wrapper.X64.GCMencryptOpt.uint8_p", "LowStar.BufferView.Down.length_eq", "FStar.UInt8.t", "LowStar.BufferView.Down.buffer", "Vale.Interop.Types.get_downview", "Vale.Arch.HeapTypes_s.TUInt8", "LowStar.Buffer.trivial_preorder", "Prims.unit", "Prims.b2t", "Prims.op_Equality", "Prims.int", "LowStar.Monotonic.Buffer.length", "Prims.squash", "Prims.op_Modulus", "LowStar.BufferView.Down.length", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
true
false
true
false
false
let length_aux5 (b: uint8_p) : Lemma (requires B.length b = 128) (ensures DV.length (get_downview b) % 16 = 0) =
let db = get_downview b in DV.length_eq db
false
Vale.Wrapper.X64.GCMencryptOpt.fsti
Vale.Wrapper.X64.GCMencryptOpt.length_aux3
val length_aux3 (b: uint8_p) (n: nat) : Lemma (requires B.length b = 16 * n) (ensures DV.length (get_downview b) % 16 = 0)
val length_aux3 (b: uint8_p) (n: nat) : Lemma (requires B.length b = 16 * n) (ensures DV.length (get_downview b) % 16 = 0)
let length_aux3 (b:uint8_p) (n:nat) : Lemma (requires B.length b = 16 * n) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db; FStar.Math.Lemmas.cancel_mul_mod n 16
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCMencryptOpt.fsti", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 41, "end_line": 49, "start_col": 0, "start_line": 44 }
module Vale.Wrapper.X64.GCMencryptOpt val z3rlimit_hack (x:nat) : squash (x < x + x + 1) #reset-options "--z3rlimit 50" open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open Vale.AsLowStar.MemoryHelpers open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.Def.Types_s open Vale.AES.GCM_helpers open Vale.AES.AES_s open Vale.AES.GCM_s open Vale.AES.GHash_s open Vale.AES.GCTR_s open Vale.AES.GCTR open Vale.Interop.Base open Vale.Arch.Types open Vale.AES.OptPublic let uint8_p = B.buffer UInt8.t let uint64 = UInt64.t let disjoint_or_eq (b1 b2:uint8_p) = B.disjoint b1 b2 \/ b1 == b2 let length_aux (b:uint8_p) : Lemma (requires B.length b = 176) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db let length_aux2 (b:uint8_p) : Lemma (requires B.length b = 240) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db
{ "checked_file": "/", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AsLowStar.MemoryHelpers.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.AES.OptPublic.fsti.checked", "Vale.AES.GHash_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.GCM_s.fst.checked", "Vale.AES.GCM_helpers.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.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.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCMencryptOpt.fsti" }
[ { "abbrev": false, "full_module": "Vale.AES.OptPublic", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GHash_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.AsLowStar.MemoryHelpers", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
b: Vale.Wrapper.X64.GCMencryptOpt.uint8_p -> n: Prims.nat -> FStar.Pervasives.Lemma (requires LowStar.Monotonic.Buffer.length b = 16 * n) (ensures LowStar.BufferView.Down.length (Vale.Interop.Types.get_downview b) % 16 = 0)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Vale.Wrapper.X64.GCMencryptOpt.uint8_p", "Prims.nat", "FStar.Math.Lemmas.cancel_mul_mod", "Prims.unit", "LowStar.BufferView.Down.length_eq", "FStar.UInt8.t", "LowStar.BufferView.Down.buffer", "Vale.Interop.Types.get_downview", "Vale.Arch.HeapTypes_s.TUInt8", "LowStar.Buffer.trivial_preorder", "Prims.b2t", "Prims.op_Equality", "Prims.int", "LowStar.Monotonic.Buffer.length", "FStar.Mul.op_Star", "Prims.squash", "Prims.op_Modulus", "LowStar.BufferView.Down.length", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
true
false
true
false
false
let length_aux3 (b: uint8_p) (n: nat) : Lemma (requires B.length b = 16 * n) (ensures DV.length (get_downview b) % 16 = 0) =
let db = get_downview b in DV.length_eq db; FStar.Math.Lemmas.cancel_mul_mod n 16
false
Vale.Wrapper.X64.GCMencryptOpt.fsti
Vale.Wrapper.X64.GCMencryptOpt.length_aux4
val length_aux4 (b: uint8_p) : Lemma (requires B.length b = 16) (ensures DV.length (get_downview b) % 16 = 0)
val length_aux4 (b: uint8_p) : Lemma (requires B.length b = 16) (ensures DV.length (get_downview b) % 16 = 0)
let length_aux4 (b:uint8_p) : Lemma (requires B.length b = 16) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCMencryptOpt.fsti", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 19, "end_line": 55, "start_col": 0, "start_line": 51 }
module Vale.Wrapper.X64.GCMencryptOpt val z3rlimit_hack (x:nat) : squash (x < x + x + 1) #reset-options "--z3rlimit 50" open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open Vale.AsLowStar.MemoryHelpers open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.Def.Types_s open Vale.AES.GCM_helpers open Vale.AES.AES_s open Vale.AES.GCM_s open Vale.AES.GHash_s open Vale.AES.GCTR_s open Vale.AES.GCTR open Vale.Interop.Base open Vale.Arch.Types open Vale.AES.OptPublic let uint8_p = B.buffer UInt8.t let uint64 = UInt64.t let disjoint_or_eq (b1 b2:uint8_p) = B.disjoint b1 b2 \/ b1 == b2 let length_aux (b:uint8_p) : Lemma (requires B.length b = 176) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db let length_aux2 (b:uint8_p) : Lemma (requires B.length b = 240) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db let length_aux3 (b:uint8_p) (n:nat) : Lemma (requires B.length b = 16 * n) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db; FStar.Math.Lemmas.cancel_mul_mod n 16
{ "checked_file": "/", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AsLowStar.MemoryHelpers.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.AES.OptPublic.fsti.checked", "Vale.AES.GHash_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.GCM_s.fst.checked", "Vale.AES.GCM_helpers.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.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.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCMencryptOpt.fsti" }
[ { "abbrev": false, "full_module": "Vale.AES.OptPublic", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GHash_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.AsLowStar.MemoryHelpers", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
b: Vale.Wrapper.X64.GCMencryptOpt.uint8_p -> FStar.Pervasives.Lemma (requires LowStar.Monotonic.Buffer.length b = 16) (ensures LowStar.BufferView.Down.length (Vale.Interop.Types.get_downview b) % 16 = 0)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Vale.Wrapper.X64.GCMencryptOpt.uint8_p", "LowStar.BufferView.Down.length_eq", "FStar.UInt8.t", "LowStar.BufferView.Down.buffer", "Vale.Interop.Types.get_downview", "Vale.Arch.HeapTypes_s.TUInt8", "LowStar.Buffer.trivial_preorder", "Prims.unit", "Prims.b2t", "Prims.op_Equality", "Prims.int", "LowStar.Monotonic.Buffer.length", "Prims.squash", "Prims.op_Modulus", "LowStar.BufferView.Down.length", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
true
false
true
false
false
let length_aux4 (b: uint8_p) : Lemma (requires B.length b = 16) (ensures DV.length (get_downview b) % 16 = 0) =
let db = get_downview b in DV.length_eq db
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha256_init
val sha256_init : Hacl.Impl.SHA2.Generic.init_vec_t Spec.Hash.Definitions.SHA2_256 Hacl.Spec.SHA2.Vec.M32
let sha256_init = init #SHA2_256 #M32
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 48, "end_line": 22, "start_col": 11, "start_line": 22 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.init_vec_t Spec.Hash.Definitions.SHA2_256 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.init", "Spec.Hash.Definitions.SHA2_256", "Hacl.Spec.SHA2.Vec.M32" ]
[]
false
false
false
true
false
let sha256_init =
init #SHA2_256 #M32
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha224_init
val sha224_init : Hacl.Impl.SHA2.Generic.init_vec_t Spec.Hash.Definitions.SHA2_224 Hacl.Spec.SHA2.Vec.M32
let sha224_init = init #SHA2_224 #M32
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 48, "end_line": 29, "start_col": 11, "start_line": 29 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.init_vec_t Spec.Hash.Definitions.SHA2_224 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.init", "Spec.Hash.Definitions.SHA2_224", "Hacl.Spec.SHA2.Vec.M32" ]
[]
false
false
false
true
false
let sha224_init =
init #SHA2_224 #M32
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha224_finish
val sha224_finish : Hacl.Impl.SHA2.Generic.finish_vec_t Spec.Hash.Definitions.SHA2_224 Hacl.Spec.SHA2.Vec.M32
let sha224_finish = finish #SHA2_224 #M32
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 52, "end_line": 59, "start_col": 11, "start_line": 59 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32 let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st #pop-options
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.finish_vec_t Spec.Hash.Definitions.SHA2_224 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.finish", "Spec.Hash.Definitions.SHA2_224", "Hacl.Spec.SHA2.Vec.M32" ]
[]
false
false
false
true
false
let sha224_finish =
finish #SHA2_224 #M32
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha256_update
val sha256_update : Hacl.Impl.SHA2.Generic.update_vec_t Spec.Hash.Definitions.SHA2_256 Hacl.Spec.SHA2.Vec.M32
let sha256_update = update #SHA2_256 #M32
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 52, "end_line": 23, "start_col": 11, "start_line": 23 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.update_vec_t Spec.Hash.Definitions.SHA2_256 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.update", "Spec.Hash.Definitions.SHA2_256", "Hacl.Spec.SHA2.Vec.M32" ]
[]
false
false
false
true
false
let sha256_update =
update #SHA2_256 #M32
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha256_update_last
val sha256_update_last : Hacl.Impl.SHA2.Generic.update_last_vec_t' Spec.Hash.Definitions.SHA2_256 Hacl.Spec.SHA2.Vec.M32
let sha256_update_last = update_last #SHA2_256 #M32 sha256_update
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 76, "end_line": 26, "start_col": 11, "start_line": 26 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 =
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.update_last_vec_t' Spec.Hash.Definitions.SHA2_256 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.update_last", "Spec.Hash.Definitions.SHA2_256", "Hacl.Spec.SHA2.Vec.M32", "Hacl.SHA2.Scalar32.sha256_update" ]
[]
false
false
false
true
false
let sha256_update_last =
update_last #SHA2_256 #M32 sha256_update
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha256_finish
val sha256_finish : Hacl.Impl.SHA2.Generic.finish_vec_t Spec.Hash.Definitions.SHA2_256 Hacl.Spec.SHA2.Vec.M32
let sha256_finish = finish #SHA2_256 #M32
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 52, "end_line": 27, "start_col": 11, "start_line": 27 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.finish_vec_t Spec.Hash.Definitions.SHA2_256 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.finish", "Spec.Hash.Definitions.SHA2_256", "Hacl.Spec.SHA2.Vec.M32" ]
[]
false
false
false
true
false
let sha256_finish =
finish #SHA2_256 #M32
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha512_init
val sha512_init : Hacl.Impl.SHA2.Generic.init_vec_t Spec.Hash.Definitions.SHA2_512 Hacl.Spec.SHA2.Vec.M32
let sha512_init = init #SHA2_512 #M32
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 37, "end_line": 61, "start_col": 0, "start_line": 61 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32 let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st #pop-options [@CInline] let sha224_finish = finish #SHA2_224 #M32
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.init_vec_t Spec.Hash.Definitions.SHA2_512 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.init", "Spec.Hash.Definitions.SHA2_512", "Hacl.Spec.SHA2.Vec.M32" ]
[]
false
false
false
true
false
let sha512_init =
init #SHA2_512 #M32
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha512_update_last
val sha512_update_last : Hacl.Impl.SHA2.Generic.update_last_vec_t' Spec.Hash.Definitions.SHA2_512 Hacl.Spec.SHA2.Vec.M32
let sha512_update_last = update_last #SHA2_512 #M32 sha512_update
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 76, "end_line": 65, "start_col": 11, "start_line": 65 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32 let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st #pop-options [@CInline] let sha224_finish = finish #SHA2_224 #M32 let sha512_init = init #SHA2_512 #M32 [@CInline] let sha512_update = update #SHA2_512 #M32 [@CInline] let sha512_update_nblocks: update_nblocks_vec_t' SHA2_512 M32 =
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.update_last_vec_t' Spec.Hash.Definitions.SHA2_512 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.update_last", "Spec.Hash.Definitions.SHA2_512", "Hacl.Spec.SHA2.Vec.M32", "Hacl.SHA2.Scalar32.sha512_update" ]
[]
false
false
false
true
false
let sha512_update_last =
update_last #SHA2_512 #M32 sha512_update
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha512_update
val sha512_update : Hacl.Impl.SHA2.Generic.update_vec_t Spec.Hash.Definitions.SHA2_512 Hacl.Spec.SHA2.Vec.M32
let sha512_update = update #SHA2_512 #M32
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 52, "end_line": 62, "start_col": 11, "start_line": 62 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32 let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st #pop-options [@CInline] let sha224_finish = finish #SHA2_224 #M32
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.update_vec_t Spec.Hash.Definitions.SHA2_512 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.update", "Spec.Hash.Definitions.SHA2_512", "Hacl.Spec.SHA2.Vec.M32" ]
[]
false
false
false
true
false
let sha512_update =
update #SHA2_512 #M32
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha384_init
val sha384_init : Hacl.Impl.SHA2.Generic.init_vec_t Spec.Hash.Definitions.SHA2_384 Hacl.Spec.SHA2.Vec.M32
let sha384_init = init #SHA2_384 #M32
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 48, "end_line": 68, "start_col": 11, "start_line": 68 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32 let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st #pop-options [@CInline] let sha224_finish = finish #SHA2_224 #M32 let sha512_init = init #SHA2_512 #M32 [@CInline] let sha512_update = update #SHA2_512 #M32 [@CInline] let sha512_update_nblocks: update_nblocks_vec_t' SHA2_512 M32 = update_nblocks #SHA2_512 #M32 sha512_update [@CInline] let sha512_update_last = update_last #SHA2_512 #M32 sha512_update [@CInline] let sha512_finish = finish #SHA2_512 #M32
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.init_vec_t Spec.Hash.Definitions.SHA2_384 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.init", "Spec.Hash.Definitions.SHA2_384", "Hacl.Spec.SHA2.Vec.M32" ]
[]
false
false
false
true
false
let sha384_init =
init #SHA2_384 #M32
false
Vale.Wrapper.X64.GCMencryptOpt.fsti
Vale.Wrapper.X64.GCMencryptOpt.encrypt_opt_stdcall_st
val encrypt_opt_stdcall_st : a: Vale.AES.AES_common_s.algorithm {a = Vale.AES.AES_common_s.AES_128 \/ a = Vale.AES.AES_common_s.AES_256} -> Type0
let encrypt_opt_stdcall_st (a: algorithm { a = AES_128 \/ a = AES_256 }) = key:Ghost.erased (Seq.seq nat32) -> iv:Ghost.erased supported_iv_LE -> plain_b:uint8_p -> plain_len:uint64 -> auth_b:uint8_p -> auth_len:uint64 -> iv_b:uint8_p -> out_b:uint8_p -> tag_b:uint8_p -> keys_b:uint8_p -> hkeys_b:uint8_p -> scratch_b:uint8_p -> Stack unit (requires fun h0 -> B.disjoint tag_b out_b /\ B.disjoint tag_b hkeys_b /\ B.disjoint tag_b plain_b /\ B.disjoint tag_b auth_b /\ B.disjoint tag_b iv_b /\ disjoint_or_eq tag_b keys_b /\ B.disjoint iv_b keys_b /\ B.disjoint iv_b out_b /\ B.disjoint iv_b plain_b /\ B.disjoint iv_b hkeys_b /\ B.disjoint iv_b auth_b /\ B.disjoint out_b keys_b /\ B.disjoint out_b hkeys_b /\ B.disjoint out_b auth_b /\ disjoint_or_eq out_b plain_b /\ B.disjoint plain_b keys_b /\ B.disjoint plain_b hkeys_b /\ B.disjoint plain_b auth_b /\ disjoint_or_eq keys_b hkeys_b /\ B.disjoint keys_b auth_b /\ B.disjoint hkeys_b auth_b /\ B.disjoint plain_b scratch_b /\ B.disjoint auth_b scratch_b /\ B.disjoint iv_b scratch_b /\ B.disjoint out_b scratch_b /\ B.disjoint tag_b scratch_b /\ B.disjoint keys_b scratch_b /\ B.disjoint hkeys_b scratch_b /\ B.live h0 auth_b /\ B.live h0 keys_b /\ B.live h0 iv_b /\ B.live h0 hkeys_b /\ B.live h0 out_b /\ B.live h0 plain_b /\ B.live h0 tag_b /\ B.live h0 scratch_b /\ B.length auth_b = UInt64.v auth_len /\ B.length iv_b = 16 /\ B.length plain_b = UInt64.v plain_len /\ B.length out_b = B.length plain_b /\ B.length hkeys_b = 128 /\ B.length tag_b == 16 /\ B.length keys_b = Vale.Wrapper.X64.AES.key_offset a /\ B.length scratch_b = 176 /\ aesni_enabled /\ pclmulqdq_enabled /\ avx_enabled /\ sse_enabled /\ movbe_enabled /\ is_aes_key_LE a (Ghost.reveal key) /\ (Seq.equal (B.as_seq h0 keys_b) (seq_nat8_to_seq_uint8 (le_seq_quad32_to_bytes (key_to_round_keys_LE a (Ghost.reveal key))))) /\ hkeys_reqs_pub (le_bytes_to_seq_quad32 (seq_uint8_to_seq_nat8 (B.as_seq h0 hkeys_b))) (reverse_bytes_quad32 (aes_encrypt_LE a (Ghost.reveal key) (Mkfour 0 0 0 0))) /\ (le_bytes_to_quad32 (seq_uint8_to_seq_nat8 (B.as_seq h0 iv_b)) == compute_iv_BE (aes_encrypt_LE a (Ghost.reveal key) (Mkfour 0 0 0 0)) (Ghost.reveal iv)) ) (ensures fun h0 _ h1 -> B.modifies (B.loc_union (B.loc_buffer scratch_b) (B.loc_union (B.loc_buffer tag_b) (B.loc_union (B.loc_buffer iv_b) (B.loc_buffer out_b)))) h0 h1 /\ (let plain = seq_uint8_to_seq_nat8 (B.as_seq h0 plain_b) in let auth = seq_uint8_to_seq_nat8 (B.as_seq h0 auth_b) in let cipher, tag = gcm_encrypt_LE a (seq_nat32_to_seq_nat8_LE (Ghost.reveal key)) (Ghost.reveal iv) plain auth in Seq.equal (seq_uint8_to_seq_nat8 (B.as_seq h1 out_b)) cipher /\ Seq.equal (seq_uint8_to_seq_nat8 (B.as_seq h1 tag_b)) tag) )
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCMencryptOpt.fsti", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 3, "end_line": 141, "start_col": 0, "start_line": 67 }
module Vale.Wrapper.X64.GCMencryptOpt val z3rlimit_hack (x:nat) : squash (x < x + x + 1) #reset-options "--z3rlimit 50" open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open Vale.AsLowStar.MemoryHelpers open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.Def.Types_s open Vale.AES.GCM_helpers open Vale.AES.AES_s open Vale.AES.GCM_s open Vale.AES.GHash_s open Vale.AES.GCTR_s open Vale.AES.GCTR open Vale.Interop.Base open Vale.Arch.Types open Vale.AES.OptPublic let uint8_p = B.buffer UInt8.t let uint64 = UInt64.t let disjoint_or_eq (b1 b2:uint8_p) = B.disjoint b1 b2 \/ b1 == b2 let length_aux (b:uint8_p) : Lemma (requires B.length b = 176) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db let length_aux2 (b:uint8_p) : Lemma (requires B.length b = 240) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db let length_aux3 (b:uint8_p) (n:nat) : Lemma (requires B.length b = 16 * n) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db; FStar.Math.Lemmas.cancel_mul_mod n 16 let length_aux4 (b:uint8_p) : Lemma (requires B.length b = 16) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db let length_aux5 (b:uint8_p) : Lemma (requires B.length b = 128) (ensures DV.length (get_downview b) % 16 = 0) = let db = get_downview b in DV.length_eq db #reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0" #restart-solver
{ "checked_file": "/", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AsLowStar.MemoryHelpers.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.AES.OptPublic.fsti.checked", "Vale.AES.GHash_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.GCM_s.fst.checked", "Vale.AES.GCM_helpers.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.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.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCMencryptOpt.fsti" }
[ { "abbrev": false, "full_module": "Vale.AES.OptPublic", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GHash_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCM_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.AsLowStar.MemoryHelpers", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.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": 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": 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": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
a: Vale.AES.AES_common_s.algorithm {a = Vale.AES.AES_common_s.AES_128 \/ a = Vale.AES.AES_common_s.AES_256} -> Type0
Prims.Tot
[ "total" ]
[]
[ "Vale.AES.AES_common_s.algorithm", "Prims.l_or", "Prims.b2t", "Prims.op_Equality", "Vale.AES.AES_common_s.AES_128", "Vale.AES.AES_common_s.AES_256", "FStar.Ghost.erased", "FStar.Seq.Base.seq", "Vale.Def.Types_s.nat32", "Vale.AES.GCM_s.supported_iv_LE", "Vale.Wrapper.X64.GCMencryptOpt.uint8_p", "Vale.Wrapper.X64.GCMencryptOpt.uint64", "Prims.unit", "FStar.Monotonic.HyperStack.mem", "Prims.l_and", "LowStar.Monotonic.Buffer.disjoint", "FStar.UInt8.t", "LowStar.Buffer.trivial_preorder", "Vale.Wrapper.X64.GCMencryptOpt.disjoint_or_eq", "LowStar.Monotonic.Buffer.live", "Prims.int", "Prims.op_GreaterThanOrEqual", "FStar.UInt.size", "FStar.UInt64.n", "LowStar.Monotonic.Buffer.length", "FStar.UInt64.v", "Prims.nat", "Prims.eq2", "Vale.Wrapper.X64.AES.key_offset", "Vale.X64.CPU_Features_s.aesni_enabled", "Vale.X64.CPU_Features_s.pclmulqdq_enabled", "Vale.X64.CPU_Features_s.avx_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.CPU_Features_s.movbe_enabled", "Vale.AES.AES_s.is_aes_key_LE", "FStar.Ghost.reveal", "FStar.Seq.Base.equal", "LowStar.Monotonic.Buffer.as_seq", "Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8", "Vale.Def.Types_s.le_seq_quad32_to_bytes", "Vale.AES.AES_s.key_to_round_keys_LE", "Vale.AES.OptPublic.hkeys_reqs_pub", "Vale.Def.Types_s.le_bytes_to_seq_quad32", "Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8", "Vale.Def.Types_s.reverse_bytes_quad32", "Vale.AES.AES_s.aes_encrypt_LE", "Vale.Def.Words_s.Mkfour", "Vale.Def.Types_s.quad32", "Vale.Def.Types_s.le_bytes_to_quad32", "Vale.AES.GCM_s.compute_iv_BE", "LowStar.Monotonic.Buffer.modifies", "LowStar.Monotonic.Buffer.loc_union", "LowStar.Monotonic.Buffer.loc_buffer", "Vale.Def.Types_s.nat8", "Vale.Def.Words_s.nat8", "Prims.logical", "FStar.Pervasives.Native.tuple2", "Vale.AES.GCM_s.gcm_encrypt_LE", "Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_LE" ]
[]
false
false
false
false
true
let encrypt_opt_stdcall_st (a: algorithm{a = AES_128 \/ a = AES_256}) =
key: Ghost.erased (Seq.seq nat32) -> iv: Ghost.erased supported_iv_LE -> plain_b: uint8_p -> plain_len: uint64 -> auth_b: uint8_p -> auth_len: uint64 -> iv_b: uint8_p -> out_b: uint8_p -> tag_b: uint8_p -> keys_b: uint8_p -> hkeys_b: uint8_p -> scratch_b: uint8_p -> Stack unit (requires fun h0 -> B.disjoint tag_b out_b /\ B.disjoint tag_b hkeys_b /\ B.disjoint tag_b plain_b /\ B.disjoint tag_b auth_b /\ B.disjoint tag_b iv_b /\ disjoint_or_eq tag_b keys_b /\ B.disjoint iv_b keys_b /\ B.disjoint iv_b out_b /\ B.disjoint iv_b plain_b /\ B.disjoint iv_b hkeys_b /\ B.disjoint iv_b auth_b /\ B.disjoint out_b keys_b /\ B.disjoint out_b hkeys_b /\ B.disjoint out_b auth_b /\ disjoint_or_eq out_b plain_b /\ B.disjoint plain_b keys_b /\ B.disjoint plain_b hkeys_b /\ B.disjoint plain_b auth_b /\ disjoint_or_eq keys_b hkeys_b /\ B.disjoint keys_b auth_b /\ B.disjoint hkeys_b auth_b /\ B.disjoint plain_b scratch_b /\ B.disjoint auth_b scratch_b /\ B.disjoint iv_b scratch_b /\ B.disjoint out_b scratch_b /\ B.disjoint tag_b scratch_b /\ B.disjoint keys_b scratch_b /\ B.disjoint hkeys_b scratch_b /\ B.live h0 auth_b /\ B.live h0 keys_b /\ B.live h0 iv_b /\ B.live h0 hkeys_b /\ B.live h0 out_b /\ B.live h0 plain_b /\ B.live h0 tag_b /\ B.live h0 scratch_b /\ B.length auth_b = UInt64.v auth_len /\ B.length iv_b = 16 /\ B.length plain_b = UInt64.v plain_len /\ B.length out_b = B.length plain_b /\ B.length hkeys_b = 128 /\ B.length tag_b == 16 /\ B.length keys_b = Vale.Wrapper.X64.AES.key_offset a /\ B.length scratch_b = 176 /\ aesni_enabled /\ pclmulqdq_enabled /\ avx_enabled /\ sse_enabled /\ movbe_enabled /\ is_aes_key_LE a (Ghost.reveal key) /\ (Seq.equal (B.as_seq h0 keys_b) (seq_nat8_to_seq_uint8 (le_seq_quad32_to_bytes (key_to_round_keys_LE a (Ghost.reveal key))))) /\ hkeys_reqs_pub (le_bytes_to_seq_quad32 (seq_uint8_to_seq_nat8 (B.as_seq h0 hkeys_b))) (reverse_bytes_quad32 (aes_encrypt_LE a (Ghost.reveal key) (Mkfour 0 0 0 0))) /\ (le_bytes_to_quad32 (seq_uint8_to_seq_nat8 (B.as_seq h0 iv_b)) == compute_iv_BE (aes_encrypt_LE a (Ghost.reveal key) (Mkfour 0 0 0 0)) (Ghost.reveal iv))) (ensures fun h0 _ h1 -> B.modifies (B.loc_union (B.loc_buffer scratch_b) (B.loc_union (B.loc_buffer tag_b) (B.loc_union (B.loc_buffer iv_b) (B.loc_buffer out_b)))) h0 h1 /\ (let plain = seq_uint8_to_seq_nat8 (B.as_seq h0 plain_b) in let auth = seq_uint8_to_seq_nat8 (B.as_seq h0 auth_b) in let cipher, tag = gcm_encrypt_LE a (seq_nat32_to_seq_nat8_LE (Ghost.reveal key)) (Ghost.reveal iv) plain auth in Seq.equal (seq_uint8_to_seq_nat8 (B.as_seq h1 out_b)) cipher /\ Seq.equal (seq_uint8_to_seq_nat8 (B.as_seq h1 tag_b)) tag))
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.coerce
val coerce (#b #a: Type) (x: a{a == b}) : b
val coerce (#b #a: Type) (x: a{a == b}) : b
let coerce (#b #a:Type) (x:a{a == b}) : b = x
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 52, "end_line": 101, "start_col": 7, "start_line": 101 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32 let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st #pop-options [@CInline] let sha224_finish = finish #SHA2_224 #M32 let sha512_init = init #SHA2_512 #M32 [@CInline] let sha512_update = update #SHA2_512 #M32 [@CInline] let sha512_update_nblocks: update_nblocks_vec_t' SHA2_512 M32 = update_nblocks #SHA2_512 #M32 sha512_update [@CInline] let sha512_update_last = update_last #SHA2_512 #M32 sha512_update [@CInline] let sha512_finish = finish #SHA2_512 #M32 [@CInline] let sha384_init = init #SHA2_384 #M32 inline_for_extraction noextract val sha384_update: update_vec_t SHA2_384 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha384_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_384_512 (as_seq_multi h0 b) (as_seq h0 st); sha512_update b st [@CInline] val sha384_update_nblocks: update_nblocks_vec_t' SHA2_384 M32 let sha384_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_384_512 len (as_seq_multi h0 b) (as_seq h0 st); sha512_update_nblocks len b st val sha384_update_last: update_last_vec_t' SHA2_384 M32 let sha384_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_384_512 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha512_update_last totlen len b st #pop-options [@CInline] let sha384_finish = finish #SHA2_384 #M32
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
x: a{a == b} -> b
Prims.Tot
[ "total" ]
[]
[ "Prims.eq2" ]
[]
false
false
false
false
false
let coerce (#b #a: Type) (x: a{a == b}) : b =
x
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha256_update_nblocks
val sha256_update_nblocks:update_nblocks_vec_t' SHA2_256 M32
val sha256_update_nblocks:update_nblocks_vec_t' SHA2_256 M32
let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 45, "end_line": 25, "start_col": 11, "start_line": 24 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.update_nblocks_vec_t' Spec.Hash.Definitions.SHA2_256 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.update_nblocks", "Spec.Hash.Definitions.SHA2_256", "Hacl.Spec.SHA2.Vec.M32", "Hacl.SHA2.Scalar32.sha256_update" ]
[]
false
false
false
true
false
let sha256_update_nblocks:update_nblocks_vec_t' SHA2_256 M32 =
update_nblocks #SHA2_256 #M32 sha256_update
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.init
val init: #a:sha2_alg -> init_vec_t a Hacl.Spec.SHA2.Vec.M32
val init: #a:sha2_alg -> init_vec_t a Hacl.Spec.SHA2.Vec.M32
let init #a = match a with | SHA2_224 -> coerce sha224_init | SHA2_256 -> coerce sha256_init | SHA2_384 -> coerce sha384_init | SHA2_512 -> coerce sha512_init
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 34, "end_line": 111, "start_col": 0, "start_line": 106 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32 let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st #pop-options [@CInline] let sha224_finish = finish #SHA2_224 #M32 let sha512_init = init #SHA2_512 #M32 [@CInline] let sha512_update = update #SHA2_512 #M32 [@CInline] let sha512_update_nblocks: update_nblocks_vec_t' SHA2_512 M32 = update_nblocks #SHA2_512 #M32 sha512_update [@CInline] let sha512_update_last = update_last #SHA2_512 #M32 sha512_update [@CInline] let sha512_finish = finish #SHA2_512 #M32 [@CInline] let sha384_init = init #SHA2_384 #M32 inline_for_extraction noextract val sha384_update: update_vec_t SHA2_384 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha384_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_384_512 (as_seq_multi h0 b) (as_seq h0 st); sha512_update b st [@CInline] val sha384_update_nblocks: update_nblocks_vec_t' SHA2_384 M32 let sha384_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_384_512 len (as_seq_multi h0 b) (as_seq h0 st); sha512_update_nblocks len b st val sha384_update_last: update_last_vec_t' SHA2_384 M32 let sha384_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_384_512 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha512_update_last totlen len b st #pop-options [@CInline] let sha384_finish = finish #SHA2_384 #M32 // Big up for Aymeric who dug this one to help me make the coercion work. unfold let coerce (#b #a:Type) (x:a{a == b}) : b = x // Agility patterns for the streaming functor inline_for_extraction noextract
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.init_vec_t a Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Spec.Hash.Definitions.sha2_alg", "Hacl.SHA2.Scalar32.coerce", "Hacl.Impl.SHA2.Generic.init_vec_t", "Hacl.Spec.SHA2.Vec.M32", "Spec.Hash.Definitions.SHA2_224", "Hacl.SHA2.Scalar32.sha224_init", "Spec.Hash.Definitions.SHA2_256", "Hacl.SHA2.Scalar32.sha256_init", "Spec.Hash.Definitions.SHA2_384", "Hacl.SHA2.Scalar32.sha384_init", "Spec.Hash.Definitions.SHA2_512", "Hacl.SHA2.Scalar32.sha512_init" ]
[]
false
false
false
false
false
let init #a =
match a with | SHA2_224 -> coerce sha224_init | SHA2_256 -> coerce sha256_init | SHA2_384 -> coerce sha384_init | SHA2_512 -> coerce sha512_init
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha384_finish
val sha384_finish : Hacl.Impl.SHA2.Generic.finish_vec_t Spec.Hash.Definitions.SHA2_384 Hacl.Spec.SHA2.Vec.M32
let sha384_finish = finish #SHA2_384 #M32
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 52, "end_line": 98, "start_col": 11, "start_line": 98 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32 let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st #pop-options [@CInline] let sha224_finish = finish #SHA2_224 #M32 let sha512_init = init #SHA2_512 #M32 [@CInline] let sha512_update = update #SHA2_512 #M32 [@CInline] let sha512_update_nblocks: update_nblocks_vec_t' SHA2_512 M32 = update_nblocks #SHA2_512 #M32 sha512_update [@CInline] let sha512_update_last = update_last #SHA2_512 #M32 sha512_update [@CInline] let sha512_finish = finish #SHA2_512 #M32 [@CInline] let sha384_init = init #SHA2_384 #M32 inline_for_extraction noextract val sha384_update: update_vec_t SHA2_384 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha384_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_384_512 (as_seq_multi h0 b) (as_seq h0 st); sha512_update b st [@CInline] val sha384_update_nblocks: update_nblocks_vec_t' SHA2_384 M32 let sha384_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_384_512 len (as_seq_multi h0 b) (as_seq h0 st); sha512_update_nblocks len b st val sha384_update_last: update_last_vec_t' SHA2_384 M32 let sha384_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_384_512 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha512_update_last totlen len b st #pop-options
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.finish_vec_t Spec.Hash.Definitions.SHA2_384 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.finish", "Spec.Hash.Definitions.SHA2_384", "Hacl.Spec.SHA2.Vec.M32" ]
[]
false
false
false
true
false
let sha384_finish =
finish #SHA2_384 #M32
false
Hacl.Spec.RSAPSS.fst
Hacl.Spec.RSAPSS.less_than_max_input_length
val less_than_max_input_length : l: Prims.int -> a: Spec.Hash.Definitions.hash_alg -> Prims.bool
let less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length
{ "file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 81, "end_line": 159, "start_col": 0, "start_line": 159 }
module Hacl.Spec.RSAPSS open FStar.Mul open Lib.IntTypes open Lib.Sequence open Hacl.Spec.Bignum.Definitions open Hacl.Spec.Bignum open Hacl.Spec.Bignum.Exponentiation module S = Spec.RSAPSS module BB = Hacl.Spec.Bignum.Base module SM = Hacl.Spec.Bignum.Montgomery module BSeq = Lib.ByteSequence module Hash = Spec.Agile.Hash #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" val blocks_bits_lemma: t:limb_t -> bs:size_pos -> Lemma (blocks (blocks bs 8) (numbytes t) == blocks bs (bits t)) let blocks_bits_lemma t bs = () val blocks_numb_lemma: t:limb_t -> bs:size_pos -> Lemma (numbytes t * blocks (blocks bs 8) (numbytes t) <= max_size_t) let blocks_numb_lemma t bs = () val bn_lt_pow2: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> bool let bn_lt_pow2 #t modBits m = if (modBits - 1) % 8 <> 0 then true else BB.unsafe_bool_of_limb0 (bn_get_ith_bit m (modBits - 1)) val bn_eval_lt_pow2_modBits: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> Lemma (requires bn_v m < pow2 modBits) (ensures bn_v m == (bn_v m / pow2 (modBits - 1) % 2) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1)) let bn_eval_lt_pow2_modBits #t modBits m = calc (==) { bn_v m; (==) { Math.Lemmas.euclidean_division_definition (bn_v m) (pow2 (modBits - 1)) } bn_v m / pow2 (modBits - 1) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1); (==) { Math.Lemmas.euclidean_division_definition (bn_v m / pow2 (modBits - 1)) 2 } (bn_v m / pow2 (modBits - 1) / 2 * 2 + bn_v m / pow2 (modBits - 1) % 2) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1); (==) { Math.Lemmas.division_multiplication_lemma (bn_v m) (pow2 (modBits - 1)) 2; Math.Lemmas.pow2_plus (modBits - 1) 1} (bn_v m / pow2 modBits * 2 + bn_v m / pow2 (modBits - 1) % 2) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1); (==) { Math.Lemmas.small_division_lemma_1 (bn_v m) (pow2 modBits) } (bn_v m / pow2 (modBits - 1) % 2) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1); } val bn_lt_pow2_lemma: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> Lemma (requires bn_v m < pow2 modBits) (ensures bn_lt_pow2 modBits m == (bn_v m < pow2 (8 * blocks (modBits - 1) 8))) let bn_lt_pow2_lemma #t modBits m = let k = blocks modBits 8 in let emLen = blocks (modBits - 1) 8 in let nLen = blocks k (numbytes t) in assert (nLen == blocks modBits (bits t)); if (modBits - 1) % 8 <> 0 then Math.Lemmas.pow2_le_compat (8 * emLen) modBits else begin assert (k == emLen + 1); bn_eval_unfold_i m nLen; assert (8 * k == modBits + 7); assert (8 * emLen == modBits - 1); bn_eval_lt_pow2_modBits modBits m; bn_get_ith_bit_lemma m (modBits - 1) end val bn_eval_sub: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> Lemma (requires bn_v m < pow2 (8 * blocks (modBits - 1) 8)) (ensures bn_v m == bn_v (sub m 0 (blocks (blocks (modBits - 1) 8) (numbytes t)))) let bn_eval_sub #t modBits m = let emLen = blocks (modBits - 1) 8 in let mLen = blocks emLen (numbytes t) in let nLen = blocks modBits (bits t) in assert (bn_v m < pow2 (8 * emLen)); let m1 = sub m 0 mLen in bn_eval_split_i m mLen; assert (bn_v m == bn_v m1 + pow2 (bits t * mLen) * bn_v (slice m mLen nLen)); bn_eval_bound m1 mLen; assert (bn_v m1 < pow2 (bits t * mLen)); Math.Lemmas.pow2_le_compat (bits t * mLen) (8 * emLen) let pkey_len_pre (t:limb_t) (modBits:size_nat) (eBits:size_nat) = let bits = bits t in 1 < modBits /\ 0 < eBits /\ 2 * bits * blocks modBits bits <= max_size_t /\ bits * blocks eBits bits <= max_size_t /\ 2 * blocks modBits bits + blocks eBits bits <= max_size_t let skey_len_pre (t:limb_t) (modBits:size_nat) (eBits:size_nat) (dBits:size_nat) = let bits = bits t in pkey_len_pre t modBits eBits /\ 0 < dBits /\ bits * blocks dBits bits <= max_size_t /\ 2 * blocks modBits bits + blocks eBits bits + blocks dBits bits <= max_size_t val rsapss_pkey_pre: #t:limb_t -> modBits:size_nat -> eBits:size_nat{pkey_len_pre t modBits eBits} -> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t)) -> Type0 let rsapss_pkey_pre #t modBits eBits pkey = let bits = bits t in let nLen = blocks modBits bits in let eLen = blocks eBits bits in let n = sub pkey 0 nLen in let r2 = sub pkey nLen nLen in let e = sub pkey (nLen + nLen) eLen in r2 == SM.bn_precomp_r2_mod_n (modBits - 1) n /\ bn_v n % 2 = 1 /\ pow2 (modBits - 1) < bn_v n /\ bn_v n < pow2 modBits /\ 0 < bn_v e /\ bn_v e < pow2 eBits val rsapss_skey_pre: #t:limb_t -> modBits:size_nat -> eBits:size_nat -> dBits:size_nat{skey_len_pre t modBits eBits dBits} -> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t)) -> Type0 let rsapss_skey_pre #t modBits eBits dBits skey = let bits = bits t in let nLen = blocks modBits bits in let eLen = blocks eBits bits in let dLen = blocks dBits bits in let pkeyLen = nLen + nLen + eLen in let pkey = sub skey 0 pkeyLen in let d = sub skey pkeyLen dLen in rsapss_pkey_pre modBits eBits pkey /\ 0 < bn_v d /\ bn_v d < pow2 dBits val rsapss_sign_pre: a:Hash.hash_alg{S.hash_is_supported a} -> modBits:size_nat{1 < modBits} -> sLen:size_nat -> salt:lseq uint8 sLen -> msgLen:nat -> msg:seq uint8{length msg == msgLen} -> Type0
{ "checked_file": "/", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Hacl.Spec.Bignum.Montgomery.fsti.checked", "Hacl.Spec.Bignum.Exponentiation.fsti.checked", "Hacl.Spec.Bignum.Definitions.fst.checked", "Hacl.Spec.Bignum.Base.fst.checked", "Hacl.Spec.Bignum.fsti.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.RSAPSS.fst" }
[ { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.ByteSequence", "short_module": "BSeq" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "SM" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Base", "short_module": "BB" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Spec.Bignum.Exponentiation", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Spec.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Spec.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "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": "Hacl.Spec", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Spec", "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
l: Prims.int -> a: Spec.Hash.Definitions.hash_alg -> Prims.bool
Prims.Tot
[ "total" ]
[]
[ "Spec.Hash.Definitions.less_than_max_input_length" ]
[]
false
false
false
true
false
let less_than_max_input_length =
Spec.Hash.Definitions.less_than_max_input_length
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha512_finish
val sha512_finish : Hacl.Impl.SHA2.Generic.finish_vec_t Spec.Hash.Definitions.SHA2_512 Hacl.Spec.SHA2.Vec.M32
let sha512_finish = finish #SHA2_512 #M32
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 52, "end_line": 66, "start_col": 11, "start_line": 66 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32 let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st #pop-options [@CInline] let sha224_finish = finish #SHA2_224 #M32 let sha512_init = init #SHA2_512 #M32 [@CInline] let sha512_update = update #SHA2_512 #M32 [@CInline] let sha512_update_nblocks: update_nblocks_vec_t' SHA2_512 M32 = update_nblocks #SHA2_512 #M32 sha512_update
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.finish_vec_t Spec.Hash.Definitions.SHA2_512 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.finish", "Spec.Hash.Definitions.SHA2_512", "Hacl.Spec.SHA2.Vec.M32" ]
[]
false
false
false
true
false
let sha512_finish =
finish #SHA2_512 #M32
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha224_update_last
val sha224_update_last: update_last_vec_t' SHA2_224 M32
val sha224_update_last: update_last_vec_t' SHA2_224 M32
let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 36, "end_line": 55, "start_col": 0, "start_line": 50 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
Hacl.Impl.SHA2.Generic.update_last_vec_t' Spec.Hash.Definitions.SHA2_224 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Spec.Hash.Definitions.len_t", "Spec.Hash.Definitions.SHA2_224", "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThanOrEqual", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Spec.Hash.Definitions.block_length", "Lib.MultiBuffer.multibuf", "Hacl.Spec.SHA2.Vec.lanes", "Hacl.Spec.SHA2.Vec.M32", "Hacl.Impl.SHA2.Core.state_t", "Hacl.SHA2.Scalar32.sha256_update_last", "Prims.unit", "Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256", "Lib.MultiBuffer.as_seq_multi", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Hacl.Spec.SHA2.Vec.element_t", "FStar.UInt32.__uint_to_t", "FStar.Monotonic.HyperStack.mem", "FStar.HyperStack.ST.get" ]
[]
false
false
false
true
false
let sha224_update_last totlen len b st =
let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha224_update
val sha224_update: update_vec_t SHA2_224 M32
val sha224_update: update_vec_t SHA2_224 M32
let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 20, "end_line": 39, "start_col": 0, "start_line": 35 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
false
Hacl.Impl.SHA2.Generic.update_vec_t Spec.Hash.Definitions.SHA2_224 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Lib.MultiBuffer.multibuf", "Hacl.Spec.SHA2.Vec.lanes", "Spec.Hash.Definitions.SHA2_224", "Hacl.Spec.SHA2.Vec.M32", "Hacl.Hash.Definitions.block_len", "Hacl.Impl.SHA2.Core.state_t", "Hacl.SHA2.Scalar32.sha256_update", "Prims.unit", "Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256", "Lib.MultiBuffer.as_seq_multi", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Hacl.Spec.SHA2.Vec.element_t", "FStar.UInt32.__uint_to_t", "FStar.Monotonic.HyperStack.mem", "FStar.HyperStack.ST.get" ]
[]
false
false
false
true
false
let sha224_update b st =
let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.sha512_update_nblocks
val sha512_update_nblocks:update_nblocks_vec_t' SHA2_512 M32
val sha512_update_nblocks:update_nblocks_vec_t' SHA2_512 M32
let sha512_update_nblocks: update_nblocks_vec_t' SHA2_512 M32 = update_nblocks #SHA2_512 #M32 sha512_update
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 45, "end_line": 64, "start_col": 11, "start_line": 63 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32 let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st #pop-options [@CInline] let sha224_finish = finish #SHA2_224 #M32 let sha512_init = init #SHA2_512 #M32
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.update_nblocks_vec_t' Spec.Hash.Definitions.SHA2_512 Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Hacl.Impl.SHA2.Generic.update_nblocks", "Spec.Hash.Definitions.SHA2_512", "Hacl.Spec.SHA2.Vec.M32", "Hacl.SHA2.Scalar32.sha512_update" ]
[]
false
false
false
true
false
let sha512_update_nblocks:update_nblocks_vec_t' SHA2_512 M32 =
update_nblocks #SHA2_512 #M32 sha512_update
false
Hacl.Spec.RSAPSS.fst
Hacl.Spec.RSAPSS.pkey_len_pre
val pkey_len_pre : t: Hacl.Spec.Bignum.Definitions.limb_t -> modBits: Lib.IntTypes.size_nat -> eBits: Lib.IntTypes.size_nat -> Prims.logical
let pkey_len_pre (t:limb_t) (modBits:size_nat) (eBits:size_nat) = let bits = bits t in 1 < modBits /\ 0 < eBits /\ 2 * bits * blocks modBits bits <= max_size_t /\ bits * blocks eBits bits <= max_size_t /\ 2 * blocks modBits bits + blocks eBits bits <= max_size_t
{ "file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 59, "end_line": 100, "start_col": 0, "start_line": 95 }
module Hacl.Spec.RSAPSS open FStar.Mul open Lib.IntTypes open Lib.Sequence open Hacl.Spec.Bignum.Definitions open Hacl.Spec.Bignum open Hacl.Spec.Bignum.Exponentiation module S = Spec.RSAPSS module BB = Hacl.Spec.Bignum.Base module SM = Hacl.Spec.Bignum.Montgomery module BSeq = Lib.ByteSequence module Hash = Spec.Agile.Hash #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" val blocks_bits_lemma: t:limb_t -> bs:size_pos -> Lemma (blocks (blocks bs 8) (numbytes t) == blocks bs (bits t)) let blocks_bits_lemma t bs = () val blocks_numb_lemma: t:limb_t -> bs:size_pos -> Lemma (numbytes t * blocks (blocks bs 8) (numbytes t) <= max_size_t) let blocks_numb_lemma t bs = () val bn_lt_pow2: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> bool let bn_lt_pow2 #t modBits m = if (modBits - 1) % 8 <> 0 then true else BB.unsafe_bool_of_limb0 (bn_get_ith_bit m (modBits - 1)) val bn_eval_lt_pow2_modBits: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> Lemma (requires bn_v m < pow2 modBits) (ensures bn_v m == (bn_v m / pow2 (modBits - 1) % 2) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1)) let bn_eval_lt_pow2_modBits #t modBits m = calc (==) { bn_v m; (==) { Math.Lemmas.euclidean_division_definition (bn_v m) (pow2 (modBits - 1)) } bn_v m / pow2 (modBits - 1) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1); (==) { Math.Lemmas.euclidean_division_definition (bn_v m / pow2 (modBits - 1)) 2 } (bn_v m / pow2 (modBits - 1) / 2 * 2 + bn_v m / pow2 (modBits - 1) % 2) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1); (==) { Math.Lemmas.division_multiplication_lemma (bn_v m) (pow2 (modBits - 1)) 2; Math.Lemmas.pow2_plus (modBits - 1) 1} (bn_v m / pow2 modBits * 2 + bn_v m / pow2 (modBits - 1) % 2) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1); (==) { Math.Lemmas.small_division_lemma_1 (bn_v m) (pow2 modBits) } (bn_v m / pow2 (modBits - 1) % 2) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1); } val bn_lt_pow2_lemma: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> Lemma (requires bn_v m < pow2 modBits) (ensures bn_lt_pow2 modBits m == (bn_v m < pow2 (8 * blocks (modBits - 1) 8))) let bn_lt_pow2_lemma #t modBits m = let k = blocks modBits 8 in let emLen = blocks (modBits - 1) 8 in let nLen = blocks k (numbytes t) in assert (nLen == blocks modBits (bits t)); if (modBits - 1) % 8 <> 0 then Math.Lemmas.pow2_le_compat (8 * emLen) modBits else begin assert (k == emLen + 1); bn_eval_unfold_i m nLen; assert (8 * k == modBits + 7); assert (8 * emLen == modBits - 1); bn_eval_lt_pow2_modBits modBits m; bn_get_ith_bit_lemma m (modBits - 1) end val bn_eval_sub: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> Lemma (requires bn_v m < pow2 (8 * blocks (modBits - 1) 8)) (ensures bn_v m == bn_v (sub m 0 (blocks (blocks (modBits - 1) 8) (numbytes t)))) let bn_eval_sub #t modBits m = let emLen = blocks (modBits - 1) 8 in let mLen = blocks emLen (numbytes t) in let nLen = blocks modBits (bits t) in assert (bn_v m < pow2 (8 * emLen)); let m1 = sub m 0 mLen in bn_eval_split_i m mLen; assert (bn_v m == bn_v m1 + pow2 (bits t * mLen) * bn_v (slice m mLen nLen)); bn_eval_bound m1 mLen; assert (bn_v m1 < pow2 (bits t * mLen)); Math.Lemmas.pow2_le_compat (bits t * mLen) (8 * emLen)
{ "checked_file": "/", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Hacl.Spec.Bignum.Montgomery.fsti.checked", "Hacl.Spec.Bignum.Exponentiation.fsti.checked", "Hacl.Spec.Bignum.Definitions.fst.checked", "Hacl.Spec.Bignum.Base.fst.checked", "Hacl.Spec.Bignum.fsti.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.RSAPSS.fst" }
[ { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.ByteSequence", "short_module": "BSeq" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "SM" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Base", "short_module": "BB" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Spec.Bignum.Exponentiation", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Spec.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Spec.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "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": "Hacl.Spec", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Spec", "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.Spec.Bignum.Definitions.limb_t -> modBits: Lib.IntTypes.size_nat -> eBits: Lib.IntTypes.size_nat -> Prims.logical
Prims.Tot
[ "total" ]
[]
[ "Hacl.Spec.Bignum.Definitions.limb_t", "Lib.IntTypes.size_nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThan", "Prims.op_LessThanOrEqual", "FStar.Mul.op_Star", "Hacl.Spec.Bignum.Definitions.blocks", "Lib.IntTypes.max_size_t", "Prims.op_Addition", "Prims.int", "Lib.IntTypes.bits", "Prims.logical" ]
[]
false
false
false
true
true
let pkey_len_pre (t: limb_t) (modBits eBits: size_nat) =
let bits = bits t in 1 < modBits /\ 0 < eBits /\ (2 * bits) * blocks modBits bits <= max_size_t /\ bits * blocks eBits bits <= max_size_t /\ 2 * blocks modBits bits + blocks eBits bits <= max_size_t
false
Hacl.SHA2.Scalar32.fst
Hacl.SHA2.Scalar32.update_nblocks
val update_nblocks: #a:sha2_alg -> update_nblocks_vec_t' a Hacl.Spec.SHA2.Vec.M32
val update_nblocks: #a:sha2_alg -> update_nblocks_vec_t' a Hacl.Spec.SHA2.Vec.M32
let update_nblocks #a = match a with | SHA2_224 -> coerce sha224_update_nblocks | SHA2_256 -> coerce sha256_update_nblocks | SHA2_384 -> coerce sha384_update_nblocks | SHA2_512 -> coerce sha512_update_nblocks
{ "file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 44, "end_line": 120, "start_col": 0, "start_line": 115 }
module Hacl.SHA2.Scalar32 open FStar.HyperStack.ST module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.NTuple open Lib.Buffer open Lib.MultiBuffer open Spec.Hash.Definitions open Spec.Agile.Hash open Hacl.Spec.SHA2.Vec module SpecVec = Hacl.Spec.SHA2.Vec open Hacl.Impl.SHA2.Generic // This module only contains internal helpers that are in support of either the // full hash function, or the streaming functor. The top-level API is now // exposed in Hacl.Streaming.SHA2.fst [@CInline] let sha256_init = init #SHA2_256 #M32 [@CInline] let sha256_update = update #SHA2_256 #M32 [@CInline] let sha256_update_nblocks: update_nblocks_vec_t' SHA2_256 M32 = update_nblocks #SHA2_256 #M32 sha256_update [@CInline] let sha256_update_last = update_last #SHA2_256 #M32 sha256_update [@CInline] let sha256_finish = finish #SHA2_256 #M32 [@CInline] let sha224_init = init #SHA2_224 #M32 inline_for_extraction noextract val sha224_update: update_vec_t SHA2_224 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha224_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_224_256 (as_seq_multi h0 b) (as_seq h0 st); sha256_update b st [@CInline] val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 let sha224_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_nblocks len b st val sha224_update_last: update_last_vec_t' SHA2_224 M32 let sha224_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_224_256 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha256_update_last totlen len b st #pop-options [@CInline] let sha224_finish = finish #SHA2_224 #M32 let sha512_init = init #SHA2_512 #M32 [@CInline] let sha512_update = update #SHA2_512 #M32 [@CInline] let sha512_update_nblocks: update_nblocks_vec_t' SHA2_512 M32 = update_nblocks #SHA2_512 #M32 sha512_update [@CInline] let sha512_update_last = update_last #SHA2_512 #M32 sha512_update [@CInline] let sha512_finish = finish #SHA2_512 #M32 [@CInline] let sha384_init = init #SHA2_384 #M32 inline_for_extraction noextract val sha384_update: update_vec_t SHA2_384 M32 #push-options "--fuel 0 --ifuel 0 --z3rlimit 20" let sha384_update b st = let open Hacl.SHA2.Scalar32.Lemmas in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_384_512 (as_seq_multi h0 b) (as_seq h0 st); sha512_update b st [@CInline] val sha384_update_nblocks: update_nblocks_vec_t' SHA2_384 M32 let sha384_update_nblocks len b st = let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_384_512 len (as_seq_multi h0 b) (as_seq h0 st); sha512_update_nblocks len b st val sha384_update_last: update_last_vec_t' SHA2_384 M32 let sha384_update_last totlen len b st = let open Lib.Sequence in let h0 = ST.get () in Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_384_512 totlen len (as_seq_multi h0 b) (as_seq h0 st); sha512_update_last totlen len b st #pop-options [@CInline] let sha384_finish = finish #SHA2_384 #M32 // Big up for Aymeric who dug this one to help me make the coercion work. unfold let coerce (#b #a:Type) (x:a{a == b}) : b = x // Agility patterns for the streaming functor inline_for_extraction noextract val init: #a:sha2_alg -> init_vec_t a Hacl.Spec.SHA2.Vec.M32 let init #a = match a with | SHA2_224 -> coerce sha224_init | SHA2_256 -> coerce sha256_init | SHA2_384 -> coerce sha384_init | SHA2_512 -> coerce sha512_init inline_for_extraction noextract
{ "checked_file": "/", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.NTuple.fsti.checked", "Lib.MultiBuffer.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.SHA2.Vec.fst.checked", "Hacl.SHA2.Scalar32.Lemmas.fst.checked", "Hacl.Impl.SHA2.Generic.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "Hacl.SHA2.Scalar32.fst" }
[ { "abbrev": false, "full_module": "Hacl.Impl.SHA2.Generic", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": "SpecVec" }, { "abbrev": false, "full_module": "Hacl.Spec.SHA2.Vec", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.MultiBuffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.NTuple", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Hacl.SHA2", "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
Hacl.Impl.SHA2.Generic.update_nblocks_vec_t' a Hacl.Spec.SHA2.Vec.M32
Prims.Tot
[ "total" ]
[]
[ "Spec.Hash.Definitions.sha2_alg", "Hacl.SHA2.Scalar32.coerce", "Hacl.Impl.SHA2.Generic.update_nblocks_vec_t'", "Hacl.Spec.SHA2.Vec.M32", "Spec.Hash.Definitions.SHA2_224", "Hacl.SHA2.Scalar32.sha224_update_nblocks", "Spec.Hash.Definitions.SHA2_256", "Hacl.SHA2.Scalar32.sha256_update_nblocks", "Spec.Hash.Definitions.SHA2_384", "Hacl.SHA2.Scalar32.sha384_update_nblocks", "Spec.Hash.Definitions.SHA2_512", "Hacl.SHA2.Scalar32.sha512_update_nblocks" ]
[]
false
false
false
false
false
let update_nblocks #a =
match a with | SHA2_224 -> coerce sha224_update_nblocks | SHA2_256 -> coerce sha256_update_nblocks | SHA2_384 -> coerce sha384_update_nblocks | SHA2_512 -> coerce sha512_update_nblocks
false