@@ -213,9 +213,10 @@ Proof.
213
213
red; intros until x. unfold shlimm.
214
214
predSpec Int.eq Int.eq_spec n Int.zero.
215
215
intros; subst. exists x; split; auto. destruct x; simpl; auto. rewrite Int.shl_zero; auto.
216
+ destruct (Int.ltu n Int.iwordsize) eqn:LT; simpl.
216
217
destruct (shlimm_match a); intros; InvEval.
217
218
exists (Vint (Int.shl n1 n)); split. EvalOp.
218
- simpl. destruct (Int.ltu n Int.iwordsize); auto.
219
+ simpl. rewrite LT. auto.
219
220
destruct (Int.ltu (Int.add n n1) Int.iwordsize) eqn:?.
220
221
exists (Val.shl v1 (Vint (Int.add n n1))); split. EvalOp.
221
222
subst. destruct v1; simpl; auto.
@@ -227,14 +228,16 @@ Proof.
227
228
simpl. auto.
228
229
subst. destruct (shift_is_scale n).
229
230
econstructor; split. EvalOp. simpl. eauto.
230
- destruct v1; simpl; auto. destruct (Int.ltu n Int.iwordsize); auto .
231
+ destruct v1; simpl; auto. rewrite LT .
231
232
rewrite Int.shl_mul. rewrite Int.mul_add_distr_l. rewrite (Int.shl_mul n1). auto.
232
233
TrivialExists. econstructor. EvalOp. simpl; eauto. constructor. auto.
233
234
destruct (shift_is_scale n).
234
235
econstructor; split. EvalOp. simpl. eauto.
235
- destruct x; simpl; auto. destruct (Int.ltu n Int.iwordsize); auto.
236
+ destruct x; simpl; auto. rewrite LT.
236
237
rewrite Int.add_zero. rewrite Int.shl_mul. auto.
237
238
TrivialExists.
239
+ intros; TrivialExists. constructor. eauto. constructor. EvalOp. simpl; eauto. constructor.
240
+ auto.
238
241
Qed .
239
242
240
243
Theorem eval_shruimm:
@@ -244,19 +247,21 @@ Proof.
244
247
red; intros until x. unfold shruimm.
245
248
predSpec Int.eq Int.eq_spec n Int.zero.
246
249
intros; subst. exists x; split; auto. destruct x; simpl; auto. rewrite Int.shru_zero; auto.
250
+ destruct (Int.ltu n Int.iwordsize) eqn:LT; simpl.
247
251
destruct (shruimm_match a); intros; InvEval.
248
252
exists (Vint (Int.shru n1 n)); split. EvalOp.
249
- simpl. destruct (Int.ltu n Int.iwordsize) ; auto.
253
+ simpl. rewrite LT ; auto.
250
254
destruct (Int.ltu (Int.add n n1) Int.iwordsize) eqn:?.
251
255
exists (Val.shru v1 (Vint (Int.add n n1))); split. EvalOp.
252
256
subst. destruct v1; simpl; auto.
253
257
rewrite Heqb.
254
258
destruct (Int.ltu n1 Int.iwordsize) eqn:?; simpl; auto.
255
- destruct (Int.ltu n Int.iwordsize) eqn:?; simpl; auto.
256
- rewrite Int.add_commut. rewrite Int.shru_shru; auto. rewrite Int.add_commut; auto.
259
+ rewrite LT. rewrite Int.add_commut. rewrite Int.shru_shru; auto. rewrite Int.add_commut; auto.
257
260
subst. TrivialExists. econstructor. EvalOp. simpl; eauto. constructor.
258
261
simpl. auto.
259
262
TrivialExists.
263
+ intros; TrivialExists. constructor. eauto. constructor. EvalOp. simpl; eauto. constructor.
264
+ auto.
260
265
Qed .
261
266
262
267
Theorem eval_shrimm:
@@ -266,19 +271,22 @@ Proof.
266
271
red; intros until x. unfold shrimm.
267
272
predSpec Int.eq Int.eq_spec n Int.zero.
268
273
intros; subst. exists x; split; auto. destruct x; simpl; auto. rewrite Int.shr_zero; auto.
274
+ destruct (Int.ltu n Int.iwordsize) eqn:LT; simpl.
269
275
destruct (shrimm_match a); intros; InvEval.
270
276
exists (Vint (Int.shr n1 n)); split. EvalOp.
271
- simpl. destruct (Int.ltu n Int.iwordsize) ; auto.
277
+ simpl. rewrite LT ; auto.
272
278
destruct (Int.ltu (Int.add n n1) Int.iwordsize) eqn:?.
273
279
exists (Val.shr v1 (Vint (Int.add n n1))); split. EvalOp.
274
280
subst. destruct v1; simpl; auto.
275
281
rewrite Heqb.
276
282
destruct (Int.ltu n1 Int.iwordsize) eqn:?; simpl; auto.
277
- destruct (Int.ltu n Int.iwordsize) eqn:?; simpl; auto.
283
+ rewrite LT.
278
284
rewrite Int.add_commut. rewrite Int.shr_shr; auto. rewrite Int.add_commut; auto.
279
285
subst. TrivialExists. econstructor. EvalOp. simpl; eauto. constructor.
280
286
simpl. auto.
281
287
TrivialExists.
288
+ intros; TrivialExists. constructor. eauto. constructor. EvalOp. simpl; eauto. constructor.
289
+ auto.
282
290
Qed .
283
291
284
292
Lemma eval_mulimm_base:
0 commit comments