Proof with (try discriminate).
intros. unfold is_longconst in *. destruct Archi.splitlong.
eapply SplitLongproof.is_longconst_sound; eauto.
assert (a = Eop (Olongconst n) Enil).
{ destruct a... destruct o... destruct e0... congruence. }
subst a. InvEval. auto.
Qed.

(* Specifications: *)
Theorem eval_intoflong: unary_constructor_sound intoflong Val.loword.
Theorem eval_longofintu: unary_constructor_sound longofintu Val.longofintu.
Theorem eval_longofint: unary_constructor_sound longofint Val.longofint.
Theorem eval_notl: unary_constructor_sound notl Val.notl.
Theorem eval_andlimm: forall n, unary_constructor_sound (andlimm n) (fun v => Val.andl v (Vlong n)).
Theorem eval_andl: binary_constructor_sound andl Val.andl.
Theorem eval_orlimm: forall n, unary_constructor_sound (orlimm n) (fun v => Val.orl v (Vlong n)).
Theorem eval_orl: binary_constructor_sound orl Val.orl.
Theorem eval_xorlimm: forall n, unary_constructor_sound (xorlimm n) (fun v => Val.xorl v (Vlong n)).
Theorem eval_xorl: binary_constructor_sound xorl Val.xorl.
Theorem eval_rolml: forall amount mask, unary_constructor_sound (fun v => rolml v amount mask) (fun v => Val.rolml v amount mask).
Theorem eval_shllimm: forall n, unary_constructor_sound (fun e => shllimm e n) (fun v => Val.shll v (Vint n)).
Theorem eval_shrluimm: forall n, unary_constructor_sound (fun e => shrluimm e n) (fun v => Val.shrlu v (Vint n)).
Theorem eval_shrlimm: forall n, unary_constructor_sound (fun e => shrlimm e n) (fun v => Val.shrl v (Vint n)).
Theorem eval_shll: binary_constructor_sound shll Val.shll.
Theorem eval_shrlu: binary_constructor_sound shrlu Val.shrlu.
Theorem eval_shrl: binary_constructor_sound shrl Val.shrl.
Theorem eval_negl: unary_constructor_sound negl Val.negl.
Theorem eval_addlimm: forall n, unary_constructor_sound (addlimm n) (fun v => Val.addl v (Vlong n)).
Theorem eval_addl: binary_constructor_sound addl Val.addl.
Theorem eval_subl: binary_constructor_sound subl Val.subl.
Theorem eval_mullimm_base: forall n, unary_constructor_sound (mullimm_base n) (fun v => Val.mull v (Vlong n)).
Theorem eval_mullimm: forall n, unary_constructor_sound (mullimm n) (fun v => Val.mull v (Vlong n)).
Theorem eval_mull: binary_constructor_sound mull Val.mull.
Theorem eval_mullhu:
forall n, unary_constructor_sound (fun a => mullhu a n) (fun v => Val.mullhu v (Vlong n)).
Theorem eval_mullhs:
forall n, unary_constructor_sound (fun a => mullhs a n) (fun v => Val.mullhs v (Vlong n)).
Theorem eval_shrxlimm:
forall le a n x z,
eval_expr ge sp e m le a x ->
Val.shrxl x (Vint n) = Some z ->
exists v, eval_expr ge sp e m le (shrxlimm a n) v /\ Val.lessdef z v.
Theorem eval_divls_base: partial_binary_constructor_sound divls_base Val.divls.
Lemma eval_modl_aux:
forall divop semdivop,
(forall sp x y m, eval_operation ge sp divop (x :: y :: nil) m = semdivop x y) ->
forall le a b x y z,
eval_expr ge sp e m le a x ->
eval_expr ge sp e m le b y ->
semdivop x y = Some z ->
eval_expr ge sp e m le (modl_aux divop a b) (Val.subl x (Val.mull z y)).
Theorem eval_modls_base: partial_binary_constructor_sound modls_base Val.modls.
Theorem eval_divlu_base: partial_binary_constructor_sound divlu_base Val.divlu.
Theorem eval_modlu_base: partial_binary_constructor_sound modlu_base Val.modlu.
Theorem eval_cmplu:
forall c le a x b y v,
eval_expr ge sp e m le a x ->
eval_expr ge sp e m le b y ->
Val.cmplu (Mem.valid_pointer m) c x y = Some v ->
eval_expr ge sp e m le (cmplu c a b) v.
Theorem eval_cmpl:
forall c le a x b y v,
eval_expr ge sp e m le a x ->
eval_expr ge sp e m le b y ->
Val.cmpl c x y = Some v ->
eval_expr ge sp e m le (cmpl c a b) v.
Theorem eval_longoffloat:
forall le a x y,
eval_expr ge sp e m le a x ->
Val.longoffloat x = Some y ->
exists v, eval_expr ge sp e m le (longoffloat a) v /\ Val.lessdef y v.
Theorem eval_floatoflong:
forall le a x y,
eval_expr ge sp e m le a x ->
Val.floatoflong x = Some y ->
exists v, eval_expr ge sp e m le (floatoflong a) v /\ Val.lessdef y v.
Theorem eval_longofsingle:
forall le a x y,
eval_expr ge sp e m le a x ->
Val.longofsingle x = Some y ->
exists v, eval_expr ge sp e m le (longofsingle a) v /\ Val.lessdef y v.
Theorem eval_intoflong: unary_constructor_sound intoflong Val.loword.
Theorem eval_longofintu: unary_constructor_sound longofintu Val.longofintu.
Theorem eval_longofint: unary_constructor_sound longofint Val.longofint.
Theorem eval_notl: unary_constructor_sound notl Val.notl.
Theorem eval_andlimm: forall n, unary_constructor_sound (andlimm n) (fun v => Val.andl v (Vlong n)).
Theorem eval_andl: binary_constructor_sound andl Val.andl.
Theorem eval_orlimm: forall n, unary_constructor_sound (orlimm n) (fun v => Val.orl v (Vlong n)).
Theorem eval_orl: binary_constructor_sound orl Val.orl.
Theorem eval_xorlimm: forall n, unary_constructor_sound (xorlimm n) (fun v => Val.xorl v (Vlong n)).
Theorem eval_xorl: binary_constructor_sound xorl Val.xorl.
Theorem eval_shllimm: forall n, unary_constructor_sound (fun e => shllimm e n) (fun v => Val.shll v (Vint n)).
Theorem eval_shrluimm: forall n, unary_constructor_sound (fun e => shrluimm e n) (fun v => Val.shrlu v (Vint n)).
Theorem eval_shrlimm: forall n, unary_constructor_sound (fun e => shrlimm e n) (fun v => Val.shrl v (Vint n)).
Theorem eval_shll: binary_constructor_sound shll Val.shll.
Theorem eval_shrlu: binary_constructor_sound shrlu Val.shrlu.
Theorem eval_shrl: binary_constructor_sound shrl Val.shrl.
Theorem eval_negl: unary_constructor_sound negl Val.negl.
Theorem eval_addlimm: forall n, unary_constructor_sound (addlimm n) (fun v => Val.addl v (Vlong n)).
Theorem eval_addl: binary_constructor_sound addl Val.addl.
Theorem eval_subl: binary_constructor_sound subl Val.subl.
Theorem eval_mullimm_base: forall n, unary_constructor_sound (mullimm_base n) (fun v => Val.mull v (Vlong n)).
Theorem eval_mullimm: forall n, unary_constructor_sound (mullimm n) (fun v => Val.mull v (Vlong n)).
Theorem eval_mull: binary_constructor_sound mull Val.mull.
Theorem eval_mullhu:
forall n, unary_constructor_sound (fun a => mullhu a n) (fun v => Val.mullhu v (Vlong n)).
Theorem eval_mullhs:
forall n, unary_constructor_sound (fun a => mullhs a n) (fun v => Val.mullhs v (Vlong n)).
Theorem eval_shrxlimm:
forall le a n x z,
eval_expr ge sp e m le a x ->
Val.shrxl x (Vint n) = Some z ->
exists v, eval_expr ge sp e m le (shrxlimm a n) v /\ Val.lessdef z v.
Theorem eval_divls_base: partial_binary_constructor_sound divls_base Val.divls.
Theorem eval_modls_base: partial_binary_constructor_sound modls_base Val.modls.
Theorem eval_divlu_base: partial_binary_constructor_sound divlu_base Val.divlu.
Theorem eval_modlu_base: partial_binary_constructor_sound modlu_base Val.modlu.
Theorem eval_cmplu:
forall c le a x b y v,
eval_expr ge sp e m le a x ->
eval_expr ge sp e m le b y ->
Val.cmplu (Mem.valid_pointer m) c x y = Some v ->
eval_expr ge sp e m le (cmplu c a b) v.
Theorem eval_cmpl:
forall c le a x b y v,
eval_expr ge sp e m le a x ->
eval_expr ge sp e m le b y ->
Val.cmpl c x y = Some v ->
eval_expr ge sp e m le (cmpl c a b) v.
Theorem eval_longoffloat: partial_unary_constructor_sound longoffloat Val.longoffloat.
Theorem eval_floatoflong: partial_unary_constructor_sound floatoflong Val.floatoflong.
Theorem eval_longofsingle: partial_unary_constructor_sound longofsingle Val.longofsingle.
Theorem eval_singleoflong: partial_unary_constructor_sound singleoflong Val.singleoflong.
End CMCONSTR.
Theorem eval_intoflong: unary_constructor_sound intoflong Val.loword.
Theorem eval_longofintu: unary_constructor_sound longofintu Val.longofintu.
Theorem eval_longofint: unary_constructor_sound longofint Val.longofint.
Theorem eval_negl: unary_constructor_sound negl Val.negl.
Theorem eval_addlimm: forall n, unary_constructor_sound (addlimm n) (fun v => Val.addl v (Vlong n)).
Theorem eval_addl: binary_constructor_sound addl Val.addl.
Theorem eval_subl: binary_constructor_sound subl Val.subl.
Theorem eval_shllimm: forall n, unary_constructor_sound (fun e => shllimm e n) (fun v => Val.shll v (Vint n)).
Theorem eval_shrluimm: forall n, unary_constructor_sound (fun e => shrluimm e n) (fun v => Val.shrlu v (Vint n)).
Theorem eval_shrlimm: forall n, unary_constructor_sound (fun e => shrlimm e n) (fun v => Val.shrl v (Vint n)).
Theorem eval_shll: binary_constructor_sound shll Val.shll.
Theorem eval_shrlu: binary_constructor_sound shrlu Val.shrlu.
Theorem eval_shrl: binary_constructor_sound shrl Val.shrl.
Theorem eval_mullimm_base: forall n, unary_constructor_sound (mullimm_base n) (fun v => Val.mull v (Vlong n)).
Theorem eval_mullimm: forall n, unary_constructor_sound (mullimm n) (fun v => Val.mull v (Vlong n)).
Theorem eval_mull: binary_constructor_sound mull Val.mull.
Theorem eval_mullhu:
forall n, unary_constructor_sound (fun a => mullhu a n) (fun v => Val.mullhu v (Vlong n)).
Theorem eval_mullhs:
forall n, unary_constructor_sound (fun a => mullhs a n) (fun v => Val.mullhs v (Vlong n)).
Theorem eval_andlimm: forall n, unary_constructor_sound (andlimm n) (fun v => Val.andl v (Vlong n)).
Theorem eval_andl: binary_constructor_sound andl Val.andl.
Theorem eval_orlimm: forall n, unary_constructor_sound (orlimm n) (fun v => Val.orl v (Vlong n)).
Theorem eval_orl: binary_constructor_sound orl Val.orl.
Theorem eval_xorlimm: forall n, unary_constructor_sound (xorlimm n) (fun v => Val.xorl v (Vlong n)).
Theorem eval_xorl: binary_constructor_sound xorl Val.xorl.
Theorem eval_notl: unary_constructor_sound notl Val.notl.
Theorem eval_divls_base: partial_binary_constructor_sound divls_base Val.divls.
Theorem eval_modls_base: partial_binary_constructor_sound modls_base Val.modls.
Theorem eval_divlu_base: partial_binary_constructor_sound divlu_base Val.divlu.
Theorem eval_modlu_base: partial_binary_constructor_sound modlu_base Val.modlu.
Theorem eval_shrxlimm:
forall le a n x z,
eval_expr ge sp e m le a x ->
Val.shrxl x (Vint n) = Some z ->
exists v, eval_expr ge sp e m le (shrxlimm a n) v /\ Val.lessdef z v.
Theorem eval_cmplu:
forall c le a x b y v,
eval_expr ge sp e m le a x ->
eval_expr ge sp e m le b y ->
Val.cmplu (Mem.valid_pointer m) c x y = Some v ->
eval_expr ge sp e m le (cmplu c a b) v.
Theorem eval_cmpl:
forall c le a x b y v,
eval_expr ge sp e m le a x ->
eval_expr ge sp e m le b y ->
Val.cmpl c x y = Some v ->
eval_expr ge sp e m le (cmpl c a b) v.
Theorem eval_longoffloat: partial_unary_constructor_sound longoffloat Val.longoffloat.
Theorem eval_longuoffloat: partial_unary_constructor_sound longuoffloat Val.longuoffloat.
Theorem eval_floatoflong: partial_unary_constructor_sound floatoflong Val.floatoflong.
Theorem eval_floatoflongu: partial_unary_constructor_sound floatoflongu Val.floatoflongu.
Theorem eval_longofsingle: partial_unary_constructor_sound longofsingle Val.longofsingle.
Theorem eval_longuofsingle: partial_unary_constructor_sound longuofsingle Val.longuofsingle.
Theorem eval_singleoflong: partial_unary_constructor_sound singleoflong Val.singleoflong.
Theorem eval_singleoflongu: partial_unary_constructor_sound singleoflongu Val.singleoflongu.
End CMCONSTR.