summaryrefslogtreecommitdiff
path: root/src/process_file.ml
diff options
context:
space:
mode:
authorAlasdair Armstrong2019-01-11 21:00:36 +0000
committerAlasdair Armstrong2019-01-11 21:00:36 +0000
commit9cfa575245a0427a0d35504086de182bd80b7df8 (patch)
tree8ac466188cfad342a35afb1557110a6ee882baaa /src/process_file.ml
parent05e6058795e71cf1543e282752cbf95e471894cc (diff)
Updates for sail-arm release
We want to ensure that no_devices.sail and devices.sail have the same effect footprint, because with a snapshot-type release in sail-arm, we can't rebuild the spec with asl_to_sail every time we switch from running elf binaries to booting OS's. This commit allows registers to have arbitrary effects, so registers that are really representing memory-mapped devices don't have to have the wmem/rmem effect.
Diffstat (limited to 'src/process_file.ml')
-rw-r--r--src/process_file.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/process_file.ml b/src/process_file.ml
index 12f2b7c0..785d7a18 100644
--- a/src/process_file.ml
+++ b/src/process_file.ml
@@ -365,7 +365,7 @@ let output libpath out_arg files =
output1 libpath out_arg f defs)
files
-let rewrite_step defs (name, rewriter) =
+let rewrite_step n total defs (name, rewriter) =
let t = Profile.start () in
let defs = rewriter defs in
Profile.finish ("rewrite " ^ name) t;
@@ -380,10 +380,12 @@ let rewrite_step defs (name, rewriter) =
opt_ddump_rewrite_ast := Some (f, i + 1)
end
| _ -> () in
+ Util.progress "Rewrite " name n total;
defs
let rewrite rewriters defs =
- try List.fold_left rewrite_step defs rewriters with
+ let total = List.length rewriters in
+ try snd (List.fold_left (fun (n, defs) rw -> n + 1, rewrite_step n total defs rw) (1, defs) rewriters) with
| Type_check.Type_error (_, l, err) ->
raise (Reporting.err_typ l (Type_error.string_of_type_error err))