aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/Asmexpand.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-07 15:51:45 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-07 15:51:45 +0200
commit76d82e41797ef79531e6bf3d530f380dddd3310e (patch)
treee166104322f4bb427993cf483623e0a01632c1b4 /powerpc/Asmexpand.ml
parent9ecede34667433bc3cacf47fb75e03a79607223b (diff)
downloadcompcert-kvx-76d82e41797ef79531e6bf3d530f380dddd3310e.tar.gz
compcert-kvx-76d82e41797ef79531e6bf3d530f380dddd3310e.zip
Added builtin for the cmpb instruction.
Diffstat (limited to 'powerpc/Asmexpand.ml')
-rw-r--r--powerpc/Asmexpand.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml
index a2c07baf..b3d357ef 100644
--- a/powerpc/Asmexpand.ml
+++ b/powerpc/Asmexpand.ml
@@ -336,6 +336,8 @@ let expand_builtin_inline name args res =
emit (Pmulhwu(res, a1, a2))
| "__builtin_clz", [BA(IR a1)], BR(IR res) ->
emit (Pcntlzw(res, a1))
+ | "__builtin_cmpb", [BA(IR a1); BA(IR a2)], BR(IR res) ->
+ emit (Pcmpb (res,a1,a2))
| ("__builtin_bswap" | "__builtin_bswap32"), [BA(IR a1)], BR(IR res) ->
emit (Pstwu(a1, Cint _m8, GPR1));
emit (Pcfi_adjust _8);