From 49342474c19558709c8cea6d70eaba9a4dd7a150 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Mon, 15 Apr 2019 17:50:30 +0200 Subject: Implement a `Osel` operation for ARM The operation comples down to conditional moves. Both integer and floating-point conditional moves are supported. --- arm/TargetPrinter.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arm/TargetPrinter.ml') diff --git a/arm/TargetPrinter.ml b/arm/TargetPrinter.ml index 20989615..64448648 100644 --- a/arm/TargetPrinter.ml +++ b/arm/TargetPrinter.ml @@ -443,6 +443,12 @@ struct (condition_name cond) ireg r1 shift_op ifso; fprintf oc " mov%s %a, %a\n" (neg_condition_name cond) ireg r1 shift_op ifnot + | Pfmovite(cond, r1, ifso, ifnot) -> + fprintf oc " ite %s\n" (condition_name cond); + fprintf oc " vmov%s %a, %a\n" + (condition_name cond) freg r1 freg ifso; + fprintf oc " vmov%s %a, %a\n" + (neg_condition_name cond) freg r1 freg ifnot | Pbtbl(r, tbl) -> if !Clflags.option_mthumb then begin fprintf oc " lsl r14, %a, #2\n" ireg r; -- cgit