aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-07-24 11:05:56 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-07-24 11:05:56 +0200
commita11f3b87e0535b6c7953c74d00d91fb7d7fbb21b (patch)
treef93d402a71f8113d5bef927ccf2177fec1a5747b
parent7da1af080217eef5626480ac30feda45ff8ca002 (diff)
downloadcompcert-kvx-a11f3b87e0535b6c7953c74d00d91fb7d7fbb21b.tar.gz
compcert-kvx-a11f3b87e0535b6c7953c74d00d91fb7d7fbb21b.zip
(#145) Fix <bad addressing> on RTL dumps
-rw-r--r--mppa_k1c/PrintOp.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/mppa_k1c/PrintOp.ml b/mppa_k1c/PrintOp.ml
index 7c408cdf..67f87000 100644
--- a/mppa_k1c/PrintOp.ml
+++ b/mppa_k1c/PrintOp.ml
@@ -222,8 +222,9 @@ let print_operation reg pp op = match op with
| _, _ -> fprintf pp "<bad operator>"
let print_addressing reg pp = function
- | Aindexed n, [r1] -> fprintf pp "%a + %Ld" reg r1 (camlint64_of_ptrofs n)
+ | Aindexed2XS scale, [r1;r2] -> fprintf pp "%a + (%a << %ld)" reg r1 reg r2 (camlint_of_coqint scale)
| Aindexed2, [r1;r2] -> fprintf pp "%a + %a" reg r1 reg r2
+ | Aindexed n, [r1] -> fprintf pp "%a + %Ld" reg r1 (camlint64_of_ptrofs n)
| Aglobal(id, ofs), [] ->
fprintf pp "\"%s\" + %Ld" (extern_atom id) (camlint64_of_ptrofs ofs)
| Ainstack ofs, [] -> fprintf pp "stack(%Ld)" (camlint64_of_ptrofs ofs)