diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-02-26 10:41:07 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-02-26 10:41:07 +0000 |
commit | 2570ddd61b1c98b62c8d97fce862654535696844 (patch) | |
tree | e9a652b115045a3b2c4ade69ec3cc3fdad429b54 /cfrontend/SimplExprproof.v | |
parent | 65cc3738e7436e46f70c0508638a71fbb49c50a8 (diff) | |
download | compcert-2570ddd61b1c98b62c8d97fce862654535696844.tar.gz compcert-2570ddd61b1c98b62c8d97fce862654535696844.zip |
- 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
Diffstat (limited to 'cfrontend/SimplExprproof.v')
-rw-r--r-- | cfrontend/SimplExprproof.v | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cfrontend/SimplExprproof.v b/cfrontend/SimplExprproof.v index a88e4c35..868f7ab0 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) |