aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-07-06 12:15:31 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-07-06 12:15:31 +0200
commit2f31c1867b75040067a1ef74ae32f197e8d296c1 (patch)
treeee453426daf3ff04d0d625f0e40e8a4a13722dab /powerpc
parentbec421ba348b0a511c7821843b04e5e9d7ccc619 (diff)
downloadcompcert-kvx-2f31c1867b75040067a1ef74ae32f197e8d296c1.tar.gz
compcert-kvx-2f31c1867b75040067a1ef74ae32f197e8d296c1.zip
Corrected little typo in __builtin_clz function.
Diffstat (limited to 'powerpc')
-rw-r--r--powerpc/Asm.v4
-rw-r--r--powerpc/Asmexpand.ml2
-rw-r--r--powerpc/TargetPrinter.ml4
3 files changed, 5 insertions, 5 deletions
diff --git a/powerpc/Asm.v b/powerpc/Asm.v
index 3fa7af31..a1d8338a 100644
--- a/powerpc/Asm.v
+++ b/powerpc/Asm.v
@@ -161,7 +161,7 @@ Inductive instruction : Type :=
| Pcmplwi: ireg -> constant -> instruction (**r same, with immediate argument *)
| Pcmpw: ireg -> ireg -> instruction (**r signed integer comparison *)
| Pcmpwi: ireg -> constant -> instruction (**r same, with immediate argument *)
- | Pcntlz: ireg -> ireg -> instruction (**r count leading zeros *)
+ | Pcntlzw: ireg -> ireg -> instruction (**r count leading zeros *)
| Pcreqv: crbit -> crbit -> crbit -> instruction (**r not-xor between condition bits *)
| Pcror: crbit -> crbit -> crbit -> instruction (**r or between condition bits *)
| Pcrxor: crbit -> crbit -> crbit -> instruction (**r xor between condition bits *)
@@ -853,7 +853,7 @@ Definition exec_instr (f: function) (i: instruction) (rs: regset) (m: mem) : out
(** The following instructions and directives are not generated directly by Asmgen,
so we do not model them. *)
| Pbdnz _
- | Pcntlz _ _
+ | Pcntlzw _ _
| Pcreqv _ _ _
| Pcrxor _ _ _
| Peieio
diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml
index 699c841f..3f4dc94b 100644
--- a/powerpc/Asmexpand.ml
+++ b/powerpc/Asmexpand.ml
@@ -343,7 +343,7 @@ let expand_builtin_inline name args res =
| "__builtin_mulhwu", [IR a1; IR a2], [IR res] ->
emit (Pmulhwu(res, a1, a2))
| "__builtin_clz", [IR a1], [IR res] ->
- emit (Pcntlz(res, a1))
+ emit (Pcntlzw(res, a1))
| ("__builtin_bswap" | "__builtin_bswap32"), [IR a1], [IR res] ->
emit (Pstwu(a1, Cint _m8, GPR1));
emit (Pcfi_adjust _8);
diff --git a/powerpc/TargetPrinter.ml b/powerpc/TargetPrinter.ml
index 8b01ac9e..1cd7fe37 100644
--- a/powerpc/TargetPrinter.ml
+++ b/powerpc/TargetPrinter.ml
@@ -461,8 +461,8 @@ module Target (System : SYSTEM):TARGET =
fprintf oc " cmpw %a, %a, %a\n" creg 0 ireg r1 ireg r2
| Pcmpwi(r1, c) ->
fprintf oc " cmpwi %a, %a, %a\n" creg 0 ireg r1 constant c
- | Pcntlz(r1, r2) ->
- fprintf oc " cntlz %a, %a\n" ireg r1 ireg r2
+ | Pcntlzw(r1, r2) ->
+ fprintf oc " cntlzw %a, %a\n" ireg r1 ireg r2
| Pcreqv(c1, c2, c3) ->
fprintf oc " creqv %a, %a, %a\n" crbit c1 crbit c2 crbit c3
| Pcror(c1, c2, c3) ->