commit 59e78fe9694fc7cd6ce64a3e10bef57a6eb05b11
parent a67ffa423cc859ac5093337e26af9c87af4631f6
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Tue, 22 Mar 2016 12:23:53 -0400
fix incorrect size suffix in abi fuzzer
Diffstat:
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git 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;