aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/PrintCsyntax.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-03-21 08:48:20 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2016-03-21 08:48:20 +0100
commit01e32a075023ce7b037d42d048b1904ba3d9a82b (patch)
tree2d01f3855234e6eb945b929e489232001c406592 /cfrontend/PrintCsyntax.ml
parent093e0ea167fde39429bf4bd3fc693a232af0d093 (diff)
parent1fdca8371317e656cb08eaec3adb4596d6447e9b (diff)
downloadcompcert-kvx-01e32a075023ce7b037d42d048b1904ba3d9a82b.tar.gz
compcert-kvx-01e32a075023ce7b037d42d048b1904ba3d9a82b.zip
Merge branch 'master' into cleanup
Diffstat (limited to 'cfrontend/PrintCsyntax.ml')
-rw-r--r--cfrontend/PrintCsyntax.ml16
1 files changed, 9 insertions, 7 deletions
diff --git a/cfrontend/PrintCsyntax.ml b/cfrontend/PrintCsyntax.ml
index d518d6bb..4287f7f9 100644
--- a/cfrontend/PrintCsyntax.ml
+++ b/cfrontend/PrintCsyntax.ml
@@ -179,9 +179,9 @@ let print_typed_value p v ty =
| Vint n, _ ->
fprintf p "%ld" (camlint_of_coqint n)
| Vfloat f, _ ->
- fprintf p "%F" (camlfloat_of_coqfloat f)
+ fprintf p "%.15F" (camlfloat_of_coqfloat f)
| Vsingle f, _ ->
- fprintf p "%Ff" (camlfloat_of_coqfloat32 f)
+ fprintf p "%.15Ff" (camlfloat_of_coqfloat32 f)
| Vlong n, Tlong(Unsigned, _) ->
fprintf p "%LuLLU" (camlint64_of_coqint n)
| Vlong n, _ ->
@@ -261,6 +261,8 @@ let rec expr p (prec, e) =
(camlstring_of_coqstring txt) exprlist (false, args)
| Ebuiltin(EF_external(id, sg), _, args, _) ->
fprintf p "%s@[<hov 1>(%a)@]" (camlstring_of_coqstring id) exprlist (true, args)
+ | Ebuiltin(EF_runtime(id, sg), _, args, _) ->
+ fprintf p "%s@[<hov 1>(%a)@]" (camlstring_of_coqstring id) exprlist (true, args)
| Ebuiltin(EF_inline_asm(txt, sg, clob), _, args, _) ->
extended_asm p txt None args clob
| Ebuiltin(EF_debug(kind,txt,_),_,args,_) ->
@@ -424,12 +426,12 @@ let print_function p id f =
let print_fundef p id fd =
match fd with
- | Csyntax.External(EF_external(_,_), args, res, cconv) ->
+ | Ctypes.External((EF_external _ | EF_runtime _), args, res, cconv) ->
fprintf p "extern %s;@ @ "
(name_cdecl (extern_atom id) (Tfunction(args, res, cconv)))
- | Csyntax.External(_, _, _, _) ->
+ | Ctypes.External(_, _, _, _) ->
()
- | Csyntax.Internal f ->
+ | Ctypes.Internal f ->
print_function p id f
let string_of_init id =
@@ -454,8 +456,8 @@ let print_init p = function
| Init_int16 n -> fprintf p "%ld" (camlint_of_coqint n)
| Init_int32 n -> fprintf p "%ld" (camlint_of_coqint n)
| Init_int64 n -> fprintf p "%LdLL" (camlint64_of_coqint n)
- | Init_float32 n -> fprintf p "%F" (camlfloat_of_coqfloat n)
- | Init_float64 n -> fprintf p "%F" (camlfloat_of_coqfloat n)
+ | Init_float32 n -> fprintf p "%.15F" (camlfloat_of_coqfloat n)
+ | Init_float64 n -> fprintf p "%.15F" (camlfloat_of_coqfloat n)
| Init_space n -> fprintf p "/* skip %ld */@ " (camlint_of_coqint n)
| Init_addrof(symb, ofs) ->
let ofs = camlint_of_coqint ofs in