@@ -233,15 +233,7 @@ let signatur p sg =
233
233
(print_option asttype) sg.sig_res
234
234
callconv sg.sig_cc
235
235
236
- let assertions = ref ([] : (ident * annot_arg list ) list )
237
-
238
- let annot_arg p = function
239
- | AA_arg ty ->
240
- fprintf p " AA_arg %a" asttype ty
241
- | AA_int n ->
242
- fprintf p " AA_int %a" coqint n
243
- | AA_float n ->
244
- fprintf p " AA_float %a" coqfloat n
236
+ let assertions = ref ([] : (ident * typ list ) list )
245
237
246
238
let external_function p = function
247
239
| EF_external (name , sg ) ->
@@ -262,12 +254,15 @@ let external_function p = function
262
254
fprintf p " (EF_memcpy %ld %ld)" (Z. to_int32 sz) (Z. to_int32 al)
263
255
| EF_annot (text , targs ) ->
264
256
assertions := (text, targs) :: ! assertions;
265
- fprintf p " (EF_annot %ld%%positive %a)" (P. to_int32 text) (print_list annot_arg ) targs
257
+ fprintf p " (EF_annot %ld%%positive %a)" (P. to_int32 text) (print_list asttype ) targs
266
258
| EF_annot_val (text , targ ) ->
267
- assertions := (text, [AA_arg targ]) :: ! assertions;
259
+ assertions := (text, [targ]) :: ! assertions;
268
260
fprintf p " (EF_annot_val %ld%%positive %a)" (P. to_int32 text) asttype targ
269
- | EF_inline_asm (text ) ->
270
- fprintf p " (EF_inline_asm %ld%%positive)" (P. to_int32 text)
261
+ | EF_inline_asm (text , sg , clob ) ->
262
+ fprintf p " @[<hov 2>(EF_inline_asm %ld%%positive@ %a@ %a)@]"
263
+ (P. to_int32 text)
264
+ signatur sg
265
+ (print_list ident) clob
271
266
272
267
(* Expressions *)
273
268
@@ -461,19 +456,9 @@ let print_assertion p (txt, targs) =
461
456
frags;
462
457
fprintf p " | %ld%%positive, " (P. to_int32 txt);
463
458
list_iteri
464
- (fun i targ ->
465
- match targ with
466
- | AA_arg _ -> fprintf p " _x%d :: " (i + 1 )
467
- | _ -> () )
459
+ (fun i targ -> fprintf p " _x%d :: " (i + 1 ))
468
460
targs;
469
461
fprintf p " nil =>@ " ;
470
- list_iteri
471
- (fun i targ ->
472
- match targ with
473
- | AA_arg _ -> ()
474
- | AA_int n -> fprintf p " let _x%d := %a in@ " (i + 1 ) coqint n
475
- | AA_float n -> fprintf p " let _x%d := %a in@ " (i + 1 ) coqfloat n)
476
- targs;
477
462
fprintf p " " ;
478
463
List. iter
479
464
(function
0 commit comments