summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-02-16 18:37:25 +0000
committerAlasdair Armstrong2018-02-16 18:38:51 +0000
commit8403ad68b451f9d41baa52087af5fd7acef6bc58 (patch)
tree0b8acb49371f471838b5e7298fea8cd2c0d1aa08 /src
parentd864aa242ac00ecee08d6d2792a0803ba5450d86 (diff)
Add __TakeColdReset function to aarch64_no_vector
Turns out the __TakeColdReset function is actually in the v8.3 XML. I went and looked for it, and it's there, it just wasn't being picked up by ASL parser because it's not called from any instructions. I added a new field to the json config files for ASL parser that can tell it about any such special functions that it should guarantee to include. Also fixed a bug in C loop compilation
Diffstat (limited to 'src')
-rw-r--r--src/c_backend.ml9
-rw-r--r--src/pretty_print_sail.ml2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/c_backend.ml b/src/c_backend.ml
index d9a964e0..77f1b39f 100644
--- a/src/c_backend.ml
+++ b/src/c_backend.ml
@@ -1524,9 +1524,12 @@ let rec compile_aexp ctx = function
let gs = gensym () in
let unit_gs = gensym () in
let loop_test = (F_unary ("!", F_id gs), CT_bool) in
- cond_setup @ [idecl CT_bool gs; idecl CT_unit unit_gs]
+ [idecl CT_bool gs; idecl CT_unit unit_gs]
@ [ilabel loop_start_label]
- @ [iblock ([cond_call (CL_id gs); ijump loop_test loop_end_label]
+ @ [iblock (cond_setup
+ @ [cond_call (CL_id gs)]
+ @ cond_cleanup
+ @ [ijump loop_test loop_end_label]
@ body_setup
@ [body_call (CL_id unit_gs)]
@ body_cleanup
@@ -1534,7 +1537,7 @@ let rec compile_aexp ctx = function
@ [ilabel loop_end_label],
CT_unit,
(fun clexp -> icopy clexp unit_fragment),
- cond_cleanup
+ []
| AE_cast (aexp, typ) -> compile_aexp ctx aexp
diff --git a/src/pretty_print_sail.ml b/src/pretty_print_sail.ml
index 7620ca50..1dac7a1c 100644
--- a/src/pretty_print_sail.ml
+++ b/src/pretty_print_sail.ml
@@ -265,7 +265,7 @@ let fixities =
(mk_id "|", (InfixR, 2));
]
in
- ref (fixities' : (prec * int) Bindings.t)
+ ref Bindings.empty (*(fixities' : (prec * int) Bindings.t)*)
let rec doc_exp (E_aux (e_aux, _) as exp) =
match e_aux with