aboutsummaryrefslogtreecommitdiffstats
path: root/mppa_k1c/TargetPrinter.ml
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-03-01 16:44:07 +0100
committerCyril SIX <cyril.six@kalray.eu>2019-03-01 16:44:07 +0100
commitd8fafb0add258e47287a2d57454194db8f1dd635 (patch)
tree8b47f5fddb0b32fef035bbb4fec68d0d40f27f31 /mppa_k1c/TargetPrinter.ml
parentdf32503f46a62b18f92363ac7f81ec0d5b36c64a (diff)
downloadcompcert-kvx-d8fafb0add258e47287a2d57454194db8f1dd635.tar.gz
compcert-kvx-d8fafb0add258e47287a2d57454194db8f1dd635.zip
Implemented float comparisons (no branching yet, and no negation)
Diffstat (limited to 'mppa_k1c/TargetPrinter.ml')
-rw-r--r--mppa_k1c/TargetPrinter.ml15
1 files changed, 15 insertions, 0 deletions
diff --git a/mppa_k1c/TargetPrinter.ml b/mppa_k1c/TargetPrinter.ml
index acb128de..ac2e3b27 100644
--- a/mppa_k1c/TargetPrinter.ml
+++ b/mppa_k1c/TargetPrinter.ml
@@ -173,6 +173,18 @@ module Target (*: TARGET*) =
| ITnone -> "none"
let icond oc c = fprintf oc "%s" (icond_name c)
+
+ let fcond_name = let open Asmblock in function
+ | FTone -> "one"
+ | FTueq -> "ueq"
+ | FToeq -> "oeq"
+ | FTune -> "une"
+ | FTolt -> "olt"
+ | FTuge -> "uge"
+ | FToge -> "oge"
+ | FTult -> "ult"
+
+ let fcond oc c = fprintf oc "%s" (fcond_name c)
let bcond_name = let open Asmblock in function
| BTwnez -> "wnez"
@@ -345,6 +357,9 @@ module Target (*: TARGET*) =
| Pcompl (it, rd, rs1, rs2) ->
fprintf oc " compd.%a %a = %a, %a\n" icond it ireg rd ireg rs1 ireg rs2
+ | Pfcompw (ft, rd, rs1, rs2) ->
+ fprintf oc " fcompw.%a %a = %a, %a\n" fcond ft ireg rd ireg rs1 ireg rs2
+
| Paddw (rd, rs1, rs2) ->
fprintf oc " addw %a = %a, %a\n" ireg rd ireg rs1 ireg rs2
| Psubw (rd, rs1, rs2) ->