diff options
author | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-03-30 10:11:01 +0200 |
---|---|---|
committer | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-03-30 10:11:01 +0200 |
commit | 0d98d7fec937d3a9a2324f1731b041cfbf16dcbe (patch) | |
tree | 84ab6b606674ff431c30db764883c6e3321b35cc /riscV/PrintOp.ml | |
parent | 17b35c465bf8aca074c8354e910af0bf8f686c09 (diff) | |
download | compcert-kvx-0d98d7fec937d3a9a2324f1731b041cfbf16dcbe.tar.gz compcert-kvx-0d98d7fec937d3a9a2324f1731b041cfbf16dcbe.zip |
Refactoring the mayundef OP to be more general...
Diffstat (limited to 'riscV/PrintOp.ml')
-rw-r--r-- | riscV/PrintOp.ml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/riscV/PrintOp.ml b/riscV/PrintOp.ml index 4494080e..3a775c20 100644 --- a/riscV/PrintOp.ml +++ b/riscV/PrintOp.ml @@ -30,6 +30,12 @@ let comparison_name = function | Cgt -> ">" | Cge -> ">=" +let mu_name pp = function + | MUint -> fprintf pp "MUint" + | MUlong -> fprintf pp "MUlong" + | MUshrx i -> fprintf pp "MUshrx(%ld)" (camlint_of_coqint i) + | MUshrxl i -> fprintf pp "MUshrxl(%ld)" (camlint_of_coqint i) + let get_optR0_s c reg pp r1 r2 = function | None -> fprintf pp "(%a %s %a)" reg r1 (comparison_name c) reg r2 | Some true -> fprintf pp "(X0 %s %a)" (comparison_name c) reg r1 @@ -226,9 +232,7 @@ let print_operation reg pp = function | OEandil n, [r1] -> fprintf pp "OEandil(%a,%ld)" reg r1 (camlint_of_coqint n) | OEoril n, [r1] -> fprintf pp "OEoril(%a,%ld)" reg r1 (camlint_of_coqint n) | OEloadli n, _ -> fprintf pp "OEloadli(%ld)" (camlint_of_coqint n) - | OEmayundef isl, [r1;r2] -> fprintf pp "OEmayundef (%b,%a,%a)" isl reg r1 reg r2 - | OEshrxundef n, [r1] -> fprintf pp "OEshrxundef (%ld,%a)" (camlint_of_coqint n) reg r1 - | OEshrxlundef n, [r1] -> fprintf pp "OEshrxlundef (%ld,%a)" (camlint_of_coqint n) reg r1 + | OEmayundef mu, [r1;r2] -> fprintf pp "OEmayundef (%a,%a,%a)" mu_name mu reg r1 reg r2 | OEfeqd, [r1;r2] -> fprintf pp "OEfeqd(%a,%s,%a)" reg r1 (comparison_name Ceq) reg r2 | OEfltd, [r1;r2] -> fprintf pp "OEfltd(%a,%s,%a)" reg r1 (comparison_name Clt) reg r2 | OEfled, [r1;r2] -> fprintf pp "OEfled(%a,%s,%a)" reg r1 (comparison_name Cle) reg r2 |