From 59e78fe9694fc7cd6ce64a3e10bef57a6eb05b11 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Tue, 22 Mar 2016 12:23:53 -0400 Subject: fix incorrect size suffix in abi fuzzer --- lisc/tools/abi.ml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lisc') diff --git a/lisc/tools/abi.ml b/lisc/tools/abi.ml index 301e160..88a59de 100644 --- a/lisc/tools/abi.ml +++ b/lisc/tools/abi.ml @@ -342,6 +342,11 @@ module OutIL = struct | Empty, () -> () in f 0 0 s + let bmemtype b = + if AB b = AB Char then "b" else + if AB b = AB Short then "h" else + btype b + let init oc = function | TA (Base b, tb) -> bvalue (b, tb) | TA (Struct s, ts) -> @@ -351,7 +356,7 @@ module OutIL = struct siter oc base (s, ts) begin fun _ addr (TB (b, tb)) -> fprintf oc "\tstore%s %s, %s\n" - (btype b) (bvalue (b, tb)) addr; + (bmemtype b) (bvalue (b, tb)) addr; end; base @@ -396,11 +401,7 @@ module OutIL = struct let typedef oc name = let rec f: type a. a sty -> unit = function | Field (b, s) -> - fprintf oc "%s" begin - if AB b = AB Char then "b" else - if AB b = AB Short then "h" else - btype b - end; + fprintf oc "%s" (bmemtype b); if not (styempty s) then fprintf oc ", "; f s; -- cgit 1.4.1