Hexagon HVX (target/hexagon) import macro definitions

Imported from the Hexagon architecture library
    imported/allext_macros.def       Top level macro include for all extensions
    imported/macros.def              Scalar core macros (some HVX here)
    imported/mmvec/macros.def        HVX macro definitions
The macro definition files specify instruction attributes that are applied
to each instruction that reverences the macro.

Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
This commit is contained in:
Taylor Simpson
2021-11-03 16:01:28 -05:00
parent 64458f4855
commit e3d143e98e
3 changed files with 955 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
/*
* Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
/*
* Top level file for all instruction set extensions
*/
#define EXTNAME mmvec
#define EXTSTR "mmvec"
#include "mmvec/macros.def"
#undef EXTNAME
#undef EXTSTR
+88
View File
@@ -176,6 +176,12 @@ DEF_MACRO(
(A_DOTNEWVALUE,A_RESTRICT_SLOT0ONLY)
)
DEF_MACRO(
fVSATUVALN,
({ ((VAL) < 0) ? 0 : ((1LL<<(N))-1);}),
()
)
DEF_MACRO(
fSATUVALN,
({fSET_OVERFLOW(); ((VAL) < 0) ? 0 : ((1LL<<(N))-1);}),
@@ -188,6 +194,12 @@ DEF_MACRO(
()
)
DEF_MACRO(
fVSATVALN,
({((VAL) < 0) ? (-(1LL<<((N)-1))) : ((1LL<<((N)-1))-1);}),
()
)
DEF_MACRO(
fZXTN, /* macro name */
((VAL) & ((1LL<<(N))-1)),
@@ -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,
@@ -234,6 +251,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)),
@@ -253,6 +276,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 */
/*************************************/
@@ -556,6 +606,18 @@ DEF_MACRO(
/* optional attributes */
)
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)),
@@ -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*/
@@ -883,6 +950,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,
,
()
)
File diff suppressed because it is too large Load Diff