From 2570ddd61b1c98b62c8d97fce862654535696844 Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 26 Feb 2012 10:41:07 +0000 Subject: - Support for _Alignof(ty) operator from ISO C 2011 and __alignof__(ty), __alignof__(expr) from GCC. - Resurrected __builtin_memcpy_aligned, useful for files generated by Scade KCG 6. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1827 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cfrontend/SimplExprproof.v | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cfrontend/SimplExprproof.v') diff --git a/cfrontend/SimplExprproof.v b/cfrontend/SimplExprproof.v index a88e4c3..868f7ab 100644 --- a/cfrontend/SimplExprproof.v +++ b/cfrontend/SimplExprproof.v @@ -243,6 +243,11 @@ Opaque makeif. split; auto. split; auto. constructor. auto. exists (Esizeof ty1 ty). split. auto. split. auto. constructor. +(* alignof *) + destruct dst. + split; auto. split; auto. constructor. + auto. + exists (Ealignof ty1 ty). split. auto. split. auto. constructor. (* var local *) split; auto. split; auto. apply eval_Evar_local; auto. (* var global *) @@ -1280,6 +1285,7 @@ Fixpoint esize (a: C.expr) : nat := | C.Ecast r1 _ => S(esize r1) | C.Econdition r1 _ _ _ => S(esize r1) | C.Esizeof _ _ => 1%nat + | C.Ealignof _ _ => 1%nat | C.Eassign l1 r2 _ => S(esize l1 + esize r2)%nat | C.Eassignop _ l1 r2 _ _ => S(esize l1 + esize r2)%nat | C.Epostincr _ l1 _ => S(esize l1) -- cgit v1.2.3