diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-10-05 08:11:34 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-10-05 08:11:34 +0000 |
commit | a6c369cbd63996c1571ae601b7d92070f024b22c (patch) | |
tree | dc4f3f5a52ae4ea230f307ce5f442137f014b79b /exportclight/ExportClight.ml | |
parent | b55147379939553eccd4289fd18e7f161619be4d (diff) | |
download | compcert-kvx-a6c369cbd63996c1571ae601b7d92070f024b22c.tar.gz compcert-kvx-a6c369cbd63996c1571ae601b7d92070f024b22c.zip |
Merge of the "alignas" branch.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2342 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'exportclight/ExportClight.ml')
-rw-r--r-- | exportclight/ExportClight.ml | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/exportclight/ExportClight.ml b/exportclight/ExportClight.ml index 9027f86d..8c83fabb 100644 --- a/exportclight/ExportClight.ml +++ b/exportclight/ExportClight.ml @@ -137,10 +137,15 @@ let coqint64 p n = let use_struct_names = ref true let rec typ p t = - let a = attr_of_type t in - if a (*.attr_volatile*) - then fprintf p "(tvolatile %a)" rtyp t - else rtyp p t + match attr_of_type t with + | { attr_volatile = false; attr_alignas = None} -> + rtyp p t + | { attr_volatile = true; attr_alignas = None} -> + fprintf p "(tvolatile %a)" rtyp t + | { attr_volatile = false; attr_alignas = Some n} -> + fprintf p "(talignas %ld%%N %a)" (N.to_int32 n) rtyp t + | { attr_volatile = true; attr_alignas = Some n} -> + fprintf p "(tvolatile_alignas %ld%%N %a)" (N.to_int32 n) rtyp t and rtyp p = function | Tvoid -> fprintf p "tvoid" |