OSDN Git Service

Hexagon (target/hexagon) Add overrides for count trailing zeros/ones
authorTaylor Simpson <tsimpson@quicinc.com>
Tue, 7 Mar 2023 22:40:58 +0000 (14:40 -0800)
committerTaylor Simpson <tsimpson@quicinc.com>
Fri, 21 Apr 2023 16:32:52 +0000 (09:32 -0700)
commita52584815e7adb2413893d2f5323bf7487c9117f
treee1f4e2bf24e2ef3872cf6619c2269d766ed4999c
parent2bda44e8aa8ed3b60c9d373dcbfaf92d51b270ec
Hexagon (target/hexagon) Add overrides for count trailing zeros/ones

The following instructions are overriden
    S2_ct0            Count trailing zeros
    S2_ct1            Count trailing ones
    S2_ct0p           Count trailing zeros (register pair)
    S2_ct1p           Count trailing ones (register pair)

These instructions are not handled by idef-parser because the
imported semantics uses bit-reverse.  However, they are
straightforward to implement in TCG with tcg_gen_ctzi_*

Test cases added to tests/tcg/hexagon/misc.c

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230405164211.30015-1-tsimpson@quicinc.com>
target/hexagon/gen_tcg.h
tests/tcg/hexagon/misc.c