diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-11-04 06:34:36 -0400 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-11-04 06:34:36 -0400 |
commit | c88da1f3dac9681b29a0d23016a7acbbc2c8c517 (patch) | |
tree | 5feb8e9651c6777ca2a07f538002f79311550ea4 /target/hexagon/imported/macros.def | |
parent | 752e235464d62d31f14a9790b4b24e396c86bb0e (diff) | |
parent | 49278c1b0d7ef5864d0d8ad9a950296deb8b05ae (diff) |
Merge remote-tracking branch 'remotes/quic/tags/pull-hex-20211103' into staging
This series adds support for the Hexagon Vector eXtensions (HVX)
These instructions are documented here
https://developer.qualcomm.com/downloads/qualcomm-hexagon-v66-hvx-programmer-s-reference-manual
Hexagon HVX is a wide vector engine with 128 byte vectors.
See patch 01 Hexagon HVX README for more information.
*** Changes in v2 ***
Remove HVX tests from makefile to avoid need for toolchain upgrade
# gpg: Signature made Wed 03 Nov 2021 05:14:44 PM EDT
# gpg: using RSA key 7B0244FB12DE4422
# gpg: Good signature from "Taylor Simpson (Rock on) <tsimpson@quicinc.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 3635 C788 CE62 B91F D4C5 9AB4 7B02 44FB 12DE 4422
* remotes/quic/tags/pull-hex-20211103: (30 commits)
Hexagon HVX (tests/tcg/hexagon) histogram test
Hexagon HVX (tests/tcg/hexagon) scatter_gather test
Hexagon HVX (tests/tcg/hexagon) hvx_misc test
Hexagon HVX (tests/tcg/hexagon) vector_add_int test
Hexagon HVX (target/hexagon) import instruction encodings
Hexagon HVX (target/hexagon) instruction decoding
Hexagon HVX (target/hexagon) import semantics
Hexagon HVX (target/hexagon) helper overrides - vector stores
Hexagon HVX (target/hexagon) helper overrides - vector loads
Hexagon HVX (target/hexagon) helper overrides - vector splat and abs
Hexagon HVX (target/hexagon) helper overrides - vector compares
Hexagon HVX (target/hexagon) helper overrides - vector logical ops
Hexagon HVX (target/hexagon) helper overrides - vector max/min
Hexagon HVX (target/hexagon) helper overrides - vector shifts
Hexagon HVX (target/hexagon) helper overrides - vector add & sub
Hexagon HVX (target/hexagon) helper overrides - vector assign & cmov
Hexagon HVX (target/hexagon) helper overrides for histogram instructions
Hexagon HVX (target/hexagon) helper overrides infrastructure
Hexagon HVX (target/hexagon) TCG generation
Hexagon HVX (target/hexagon) helper functions
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hexagon/imported/macros.def')
-rwxr-xr-x | target/hexagon/imported/macros.def | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/target/hexagon/imported/macros.def b/target/hexagon/imported/macros.def index 32ed3bf8fc..e23f91562e 100755 --- a/target/hexagon/imported/macros.def +++ b/target/hexagon/imported/macros.def @@ -177,6 +177,12 @@ DEF_MACRO( ) DEF_MACRO( + fVSATUVALN, + ({ ((VAL) < 0) ? 0 : ((1LL<<(N))-1);}), + () +) + +DEF_MACRO( fSATUVALN, ({fSET_OVERFLOW(); ((VAL) < 0) ? 0 : ((1LL<<(N))-1);}), () @@ -189,6 +195,12 @@ DEF_MACRO( ) DEF_MACRO( + fVSATVALN, + ({((VAL) < 0) ? (-(1LL<<((N)-1))) : ((1LL<<((N)-1))-1);}), + () +) + +DEF_MACRO( fZXTN, /* macro name */ ((VAL) & ((1LL<<(N))-1)), /* attribs */ @@ -205,6 +217,11 @@ DEF_MACRO( ((fSXTN(N,64,VAL) == (VAL)) ? (VAL) : fSATVALN(N,VAL)), () ) +DEF_MACRO( + fVSATN, + ((fSXTN(N,64,VAL) == (VAL)) ? (VAL) : fVSATVALN(N,VAL)), + () +) DEF_MACRO( fADDSAT64, @@ -235,6 +252,12 @@ DEF_MACRO( ) DEF_MACRO( + fVSATUN, + ((fZXTN(N,64,VAL) == (VAL)) ? (VAL) : fVSATUVALN(N,VAL)), + () +) + +DEF_MACRO( fSATUN, ((fZXTN(N,64,VAL) == (VAL)) ? (VAL) : fSATUVALN(N,VAL)), () @@ -254,6 +277,19 @@ DEF_MACRO( ) DEF_MACRO( + fVSATH, + (fVSATN(16,VAL)), + () +) + +DEF_MACRO( + fVSATUH, + (fVSATUN(16,VAL)), + () +) + + +DEF_MACRO( fSATUB, (fSATUN(8,VAL)), () @@ -265,6 +301,20 @@ DEF_MACRO( ) +DEF_MACRO( + fVSATUB, + (fVSATUN(8,VAL)), + () +) +DEF_MACRO( + fVSATB, + (fVSATN(8,VAL)), + () +) + + + + /*************************************/ /* immediate extension */ /*************************************/ @@ -557,6 +607,18 @@ DEF_MACRO( ) DEF_MACRO( + fCAST2_2s, /* macro name */ + ((size2s_t)(A)), + /* optional attributes */ +) + +DEF_MACRO( + fCAST2_2u, /* macro name */ + ((size2u_t)(A)), + /* optional attributes */ +) + +DEF_MACRO( fCAST4_4s, /* macro name */ ((size4s_t)(A)), /* optional attributes */ @@ -876,6 +938,11 @@ DEF_MACRO( (((size8s_t)(A))<<N), /* optional attributes */ ) +DEF_MACRO( + fVSATW, /* saturating to 32-bits*/ + fVSATN(32,((long long)A)), + () +) DEF_MACRO( fSATW, /* saturating to 32-bits*/ @@ -884,6 +951,12 @@ DEF_MACRO( ) DEF_MACRO( + fVSAT, /* saturating to 32-bits*/ + fVSATN(32,(A)), + () +) + +DEF_MACRO( fSAT, /* saturating to 32-bits*/ fSATN(32,(A)), () @@ -1389,6 +1462,11 @@ DEF_MACRO(fSETBITS, /*************************************/ /* Used for parity, etc........ */ /*************************************/ +DEF_MACRO(fCOUNTONES_2, + count_ones_2(VAL), + /* nothing */ +) + DEF_MACRO(fCOUNTONES_4, count_ones_4(VAL), /* nothing */ @@ -1419,6 +1497,11 @@ DEF_MACRO(fCL1_4, /* nothing */ ) +DEF_MACRO(fCL1_2, + count_leading_ones_2(VAL), + /* nothing */ +) + DEF_MACRO(fINTERLEAVE, interleave(ODD,EVEN), /* nothing */ @@ -1576,3 +1659,8 @@ DEF_MACRO(fBRANCH_SPECULATE_STALL, }, () ) + +DEF_MACRO(IV1DEAD, + , + () +) |