diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2019-04-15 17:50:30 +0200 |
---|---|---|
committer | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2019-05-20 18:00:46 +0200 |
commit | 49342474c19558709c8cea6d70eaba9a4dd7a150 (patch) | |
tree | 86fb6e9fc2081a71a2d770811164bb2f72b867e6 /arm/PrintOp.ml | |
parent | 996f2e071baaf52105714283d141af2eac8ffbfb (diff) | |
download | compcert-kvx-49342474c19558709c8cea6d70eaba9a4dd7a150.tar.gz compcert-kvx-49342474c19558709c8cea6d70eaba9a4dd7a150.zip |
Implement a `Osel` operation for ARM
The operation comples down to conditional moves.
Both integer and floating-point conditional moves are supported.
Diffstat (limited to 'arm/PrintOp.ml')
-rw-r--r-- | arm/PrintOp.ml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arm/PrintOp.ml b/arm/PrintOp.ml index 642fff80..d74acf3f 100644 --- a/arm/PrintOp.ml +++ b/arm/PrintOp.ml @@ -129,6 +129,10 @@ let print_operation reg pp = function | Olowlong, [r1] -> fprintf pp "lowlong(%a)" reg r1 | Ohighlong, [r1] -> fprintf pp "highlong(%a)" reg r1 | Ocmp c, args -> print_condition reg pp (c, args) + | Osel (c, ty), r1::r2::args -> + fprintf pp "%a ?%s %a : %a" + (print_condition reg) (c, args) + (PrintAST.name_of_type ty) reg r1 reg r2 | _ -> fprintf pp "<bad operator>" let print_addressing reg pp = function |