mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-30 23:10:38 +00:00
Hexagon (target/hexagon/imported) arch import
Imported from the Hexagon architecture library imported/macros.def The macro definitions specify instruction attributes that are applied to each instruction that references the macro. The generator will recursively apply attributes to each instruction that used the macro. imported/allidefs.def Top level instruction definition file imported/*.idef Instruction definition files These files are input to the first phase of the generator (gen_semantics.c) to create a python include file with the instruction semantics and attributes. The python include file is fed to the second phase to generate various header files. imported/encode*.def Instruction encoding bit patterns for every instruction Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Acked-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-19-git-send-email-tsimpson@quicinc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
becbf4b8a0
commit
7cf9345c95
30
target/hexagon/imported/allidefs.def
Normal file
30
target/hexagon/imported/allidefs.def
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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 instruction definition file
|
||||
*/
|
||||
|
||||
#include "branch.idef"
|
||||
#include "ldst.idef"
|
||||
#include "compare.idef"
|
||||
#include "mpy.idef"
|
||||
#include "alu.idef"
|
||||
#include "float.idef"
|
||||
#include "shift.idef"
|
||||
#include "system.idef"
|
||||
#include "subinsns.idef"
|
1258
target/hexagon/imported/alu.idef
Normal file
1258
target/hexagon/imported/alu.idef
Normal file
File diff suppressed because it is too large
Load Diff
326
target/hexagon/imported/branch.idef
Normal file
326
target/hexagon/imported/branch.idef
Normal file
@ -0,0 +1,326 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
|
||||
/*********************************************/
|
||||
/* Jump instructions */
|
||||
/*********************************************/
|
||||
|
||||
#define A_JDIR A_JUMP
|
||||
#define A_CJNEWDIR A_JUMP
|
||||
#define A_CJOLDDIR A_JUMP
|
||||
#define A_NEWVALUEJ A_JUMP,A_DOTNEWVALUE,A_MEMLIKE_PACKET_RULES
|
||||
#define A_JINDIR A_JUMP,A_INDIRECT
|
||||
#define A_JINDIRNEW A_JUMP,A_INDIRECT
|
||||
#define A_JINDIROLD A_JUMP,A_INDIRECT
|
||||
|
||||
Q6INSN(J2_jump,"jump #r22:2",ATTRIBS(A_JDIR), "direct unconditional jump",
|
||||
{fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);})
|
||||
|
||||
Q6INSN(J2_jumpr,"jumpr Rs32",ATTRIBS(A_JINDIR), "indirect unconditional jump",
|
||||
{fJUMPR(RsN,RsV,COF_TYPE_JUMPR);})
|
||||
|
||||
#define OLDCOND_JUMP(TAG,OPER,OPER2,ATTRIB,DESCR,SEMANTICS) \
|
||||
Q6INSN(TAG##t,"if (Pu4) "OPER":nt "OPER2,ATTRIB,DESCR,{fBRANCH_SPECULATE_STALL(fLSBOLD(PuV),,SPECULATE_NOT_TAKEN,12,0); if (fLSBOLD(PuV)) { SEMANTICS; }}) \
|
||||
Q6INSN(TAG##f,"if (!Pu4) "OPER":nt "OPER2,ATTRIB,DESCR,{fBRANCH_SPECULATE_STALL(fLSBOLDNOT(PuV),,SPECULATE_NOT_TAKEN,12,0); if (fLSBOLDNOT(PuV)) { SEMANTICS; }}) \
|
||||
Q6INSN(TAG##tpt,"if (Pu4) "OPER":t "OPER2,ATTRIB,DESCR,{fBRANCH_SPECULATE_STALL(fLSBOLD(PuV),,SPECULATE_TAKEN,12,0); if (fLSBOLD(PuV)) { SEMANTICS; }}) \
|
||||
Q6INSN(TAG##fpt,"if (!Pu4) "OPER":t "OPER2,ATTRIB,DESCR,{fBRANCH_SPECULATE_STALL(fLSBOLDNOT(PuV),,SPECULATE_TAKEN,12,0); if (fLSBOLDNOT(PuV)) { SEMANTICS; }})
|
||||
|
||||
OLDCOND_JUMP(J2_jump,"jump","#r15:2",ATTRIBS(A_CJOLDDIR),"direct conditional jump",
|
||||
fIMMEXT(riV);fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);)
|
||||
|
||||
OLDCOND_JUMP(J2_jumpr,"jumpr","Rs32",ATTRIBS(A_JINDIROLD),"indirect conditional jump",
|
||||
fJUMPR(RsN,RsV,COF_TYPE_JUMPR);)
|
||||
|
||||
#define NEWCOND_JUMP(TAG,OPER,OPER2,ATTRIB,DESCR,SEMANTICS)\
|
||||
Q6INSN(TAG##tnew,"if (Pu4.new) "OPER":nt "OPER2,ATTRIB,DESCR,{fBRANCH_SPECULATE_STALL(fLSBNEW(PuN),, SPECULATE_NOT_TAKEN , 12,0)} {if(fLSBNEW(PuN)){SEMANTICS;}})\
|
||||
Q6INSN(TAG##fnew,"if (!Pu4.new) "OPER":nt "OPER2,ATTRIB,DESCR,{fBRANCH_SPECULATE_STALL(fLSBNEWNOT(PuN),, SPECULATE_NOT_TAKEN , 12,0)} {if(fLSBNEWNOT(PuN)){SEMANTICS;}})\
|
||||
Q6INSN(TAG##tnewpt,"if (Pu4.new) "OPER":t "OPER2,ATTRIB,DESCR,{fBRANCH_SPECULATE_STALL(fLSBNEW(PuN),, SPECULATE_TAKEN , 12,0)} {if(fLSBNEW(PuN)){SEMANTICS;}})\
|
||||
Q6INSN(TAG##fnewpt,"if (!Pu4.new) "OPER":t "OPER2,ATTRIB,DESCR,{fBRANCH_SPECULATE_STALL(fLSBNEWNOT(PuN),, SPECULATE_TAKEN , 12,0)} {if(fLSBNEWNOT(PuN)){SEMANTICS;}})
|
||||
|
||||
NEWCOND_JUMP(J2_jump,"jump","#r15:2",ATTRIBS(A_CJNEWDIR,A_ARCHV2),"direct conditional jump",
|
||||
fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMPNEW);)
|
||||
|
||||
NEWCOND_JUMP(J2_jumpr,"jumpr","Rs32",ATTRIBS(A_JINDIRNEW,A_ARCHV3),"indirect conditional jump",
|
||||
fJUMPR(RsN,RsV,COF_TYPE_JUMPR);)
|
||||
|
||||
|
||||
|
||||
Q6INSN(J4_hintjumpr,"hintjr(Rs32)",ATTRIBS(A_JINDIR),"hint indirect conditional jump",
|
||||
{fHINTJR(RsV);})
|
||||
|
||||
|
||||
/*********************************************/
|
||||
/* Compound Compare-Jumps */
|
||||
/*********************************************/
|
||||
Q6INSN(J2_jumprz,"if (Rs32!=#0) jump:nt #r13:2",ATTRIBS(A_CJNEWDIR,A_ARCHV3),"direct conditional jump if register true",
|
||||
{fBRANCH_SPECULATE_STALL((RsV!=0), , SPECULATE_NOT_TAKEN,12,0) if (RsV != 0) { fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})
|
||||
|
||||
Q6INSN(J2_jumprnz,"if (Rs32==#0) jump:nt #r13:2",ATTRIBS(A_CJNEWDIR,A_ARCHV3),"direct conditional jump if register false",
|
||||
{fBRANCH_SPECULATE_STALL((RsV==0), , SPECULATE_NOT_TAKEN,12,0) if (RsV == 0) {fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})
|
||||
|
||||
Q6INSN(J2_jumprzpt,"if (Rs32!=#0) jump:t #r13:2",ATTRIBS(A_CJNEWDIR,A_ARCHV3),"direct conditional jump if register true",
|
||||
{fBRANCH_SPECULATE_STALL((RsV!=0), , SPECULATE_TAKEN,12,0) if (RsV != 0) { fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})
|
||||
|
||||
Q6INSN(J2_jumprnzpt,"if (Rs32==#0) jump:t #r13:2",ATTRIBS(A_CJNEWDIR,A_ARCHV3),"direct conditional jump if register false",
|
||||
{fBRANCH_SPECULATE_STALL((RsV==0), , SPECULATE_TAKEN,12,0) if (RsV == 0) {fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})
|
||||
|
||||
Q6INSN(J2_jumprgtez,"if (Rs32>=#0) jump:nt #r13:2",ATTRIBS(A_CJNEWDIR,A_ARCHV3),"direct conditional jump if register greater or equal to zero",
|
||||
{fBRANCH_SPECULATE_STALL((RsV>=0), , SPECULATE_NOT_TAKEN,12,0) if (RsV>=0) { fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})
|
||||
|
||||
Q6INSN(J2_jumprgtezpt,"if (Rs32>=#0) jump:t #r13:2",ATTRIBS(A_CJNEWDIR,A_ARCHV3),"direct conditional jump if register greater or equal to zero",
|
||||
{fBRANCH_SPECULATE_STALL((RsV>=0), , SPECULATE_TAKEN,12,0) if (RsV>=0) { fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})
|
||||
|
||||
Q6INSN(J2_jumprltez,"if (Rs32<=#0) jump:nt #r13:2",ATTRIBS(A_CJNEWDIR,A_ARCHV3),"direct conditional jump if register less than or equal to zero",
|
||||
{fBRANCH_SPECULATE_STALL((RsV<=0), , SPECULATE_NOT_TAKEN,12,0) if (RsV<=0) { fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})
|
||||
|
||||
Q6INSN(J2_jumprltezpt,"if (Rs32<=#0) jump:t #r13:2",ATTRIBS(A_CJNEWDIR,A_ARCHV3),"direct conditional jump if register less than or equal to zero",
|
||||
{fBRANCH_SPECULATE_STALL((RsV<=0), , SPECULATE_TAKEN,12,0) if (RsV<=0) { fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})
|
||||
|
||||
|
||||
|
||||
/*********************************************/
|
||||
/* V4 Compound Compare-Jumps */
|
||||
/*********************************************/
|
||||
|
||||
|
||||
/* V4 compound compare jumps (CJ) */
|
||||
#define STD_CMPJUMP(TAG,TST,TSTSEM)\
|
||||
Q6INSN(J4_##TAG##_tp0_jump_nt, "p0="TST"; if (p0.new) jump:nt #r9:2", ATTRIBS(A_CJNEWDIR,A_NEWCMPJUMP),"compound compare-jump", {fPART1(fWRITE_P0(f8BITSOF(TSTSEM))) fBRANCH_SPECULATE_STALL(fLSBNEW0,,SPECULATE_NOT_TAKEN,13,0) if (fLSBNEW0) {fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})\
|
||||
Q6INSN(J4_##TAG##_fp0_jump_nt, "p0="TST"; if (!p0.new) jump:nt #r9:2", ATTRIBS(A_CJNEWDIR,A_NEWCMPJUMP),"compound compare-jump",{fPART1(fWRITE_P0(f8BITSOF(TSTSEM))) fBRANCH_SPECULATE_STALL(fLSBNEW0NOT,,SPECULATE_NOT_TAKEN,13,0) if (fLSBNEW0NOT) {fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})\
|
||||
Q6INSN(J4_##TAG##_tp0_jump_t, "p0="TST"; if (p0.new) jump:t #r9:2", ATTRIBS(A_CJNEWDIR,A_NEWCMPJUMP),"compound compare-jump", {fPART1(fWRITE_P0(f8BITSOF(TSTSEM))) fBRANCH_SPECULATE_STALL(fLSBNEW0,,SPECULATE_TAKEN,13,0) if (fLSBNEW0) {fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})\
|
||||
Q6INSN(J4_##TAG##_fp0_jump_t, "p0="TST"; if (!p0.new) jump:t #r9:2", ATTRIBS(A_CJNEWDIR,A_NEWCMPJUMP),"compound compare-jump", {fPART1(fWRITE_P0(f8BITSOF(TSTSEM))) fBRANCH_SPECULATE_STALL(fLSBNEW0NOT,,SPECULATE_TAKEN,13,0) if (fLSBNEW0NOT) {fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})\
|
||||
Q6INSN(J4_##TAG##_tp1_jump_nt, "p1="TST"; if (p1.new) jump:nt #r9:2", ATTRIBS(A_CJNEWDIR,A_NEWCMPJUMP),"compound compare-jump", {fPART1(fWRITE_P1(f8BITSOF(TSTSEM))) fBRANCH_SPECULATE_STALL(fLSBNEW1,,SPECULATE_NOT_TAKEN,13,0) if (fLSBNEW1) {fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})\
|
||||
Q6INSN(J4_##TAG##_fp1_jump_nt, "p1="TST"; if (!p1.new) jump:nt #r9:2", ATTRIBS(A_CJNEWDIR,A_NEWCMPJUMP),"compound compare-jump",{fPART1(fWRITE_P1(f8BITSOF(TSTSEM))) fBRANCH_SPECULATE_STALL(fLSBNEW1NOT,,SPECULATE_NOT_TAKEN,13,0) if (fLSBNEW1NOT) {fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})\
|
||||
Q6INSN(J4_##TAG##_tp1_jump_t, "p1="TST"; if (p1.new) jump:t #r9:2", ATTRIBS(A_CJNEWDIR,A_NEWCMPJUMP),"compound compare-jump", {fPART1(fWRITE_P1(f8BITSOF(TSTSEM))) fBRANCH_SPECULATE_STALL(fLSBNEW1,,SPECULATE_TAKEN,13,0) if (fLSBNEW1) {fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})\
|
||||
Q6INSN(J4_##TAG##_fp1_jump_t, "p1="TST"; if (!p1.new) jump:t #r9:2", ATTRIBS(A_CJNEWDIR,A_NEWCMPJUMP),"compound compare-jump", {fPART1(fWRITE_P1(f8BITSOF(TSTSEM))) fBRANCH_SPECULATE_STALL(fLSBNEW1NOT,,SPECULATE_TAKEN,13,0) if (fLSBNEW1NOT) {fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})
|
||||
|
||||
|
||||
STD_CMPJUMP(cmpeqi,"cmp.eq(Rs16,#U5)",(RsV==UiV))
|
||||
STD_CMPJUMP(cmpgti,"cmp.gt(Rs16,#U5)",(RsV>UiV))
|
||||
STD_CMPJUMP(cmpgtui,"cmp.gtu(Rs16,#U5)",(fCAST4u(RsV)>UiV))
|
||||
|
||||
STD_CMPJUMP(cmpeqn1,"cmp.eq(Rs16,#-1)",(RsV==-1))
|
||||
STD_CMPJUMP(cmpgtn1,"cmp.gt(Rs16,#-1)",(RsV>-1))
|
||||
STD_CMPJUMP(tstbit0,"tstbit(Rs16,#0)",(RsV & 1))
|
||||
|
||||
STD_CMPJUMP(cmpeq,"cmp.eq(Rs16,Rt16)",(RsV==RtV))
|
||||
STD_CMPJUMP(cmpgt,"cmp.gt(Rs16,Rt16)",(RsV>RtV))
|
||||
STD_CMPJUMP(cmpgtu,"cmp.gtu(Rs16,Rt16)",(fCAST4u(RsV)>RtV))
|
||||
|
||||
|
||||
|
||||
/* V4 jump and transfer (CJ) */
|
||||
Q6INSN(J4_jumpseti,"Rd16=#U6 ; jump #r9:2",ATTRIBS(A_JDIR), "direct unconditional jump and set register to immediate",
|
||||
{fIMMEXT(riV); fPCALIGN(riV); RdV=UiV; fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);})
|
||||
|
||||
Q6INSN(J4_jumpsetr,"Rd16=Rs16 ; jump #r9:2",ATTRIBS(A_JDIR), "direct unconditional jump and transfer register",
|
||||
{fIMMEXT(riV); fPCALIGN(riV); RdV=RsV; fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);})
|
||||
|
||||
|
||||
/* V4 new-value jumps (NCJ) */
|
||||
#define STD_CMPJUMPNEWRS(TAG,TST,TSTSEM)\
|
||||
Q6INSN(J4_##TAG##_jumpnv_t, "if ("TST") jump:t #r9:2", ATTRIBS(A_NEWVALUEJ),"compound compare-jump",{fBRANCH_SPECULATE_STALL(TSTSEM,,SPECULATE_TAKEN,13,0);if (TSTSEM) {fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})\
|
||||
Q6INSN(J4_##TAG##_jumpnv_nt,"if ("TST") jump:nt #r9:2",ATTRIBS(A_NEWVALUEJ),"compound compare-jump",{fBRANCH_SPECULATE_STALL(TSTSEM,,SPECULATE_NOT_TAKEN,13,0); if (TSTSEM) {fIMMEXT(riV); fPCALIGN(riV); fBRANCH(fREAD_PC()+riV,COF_TYPE_JUMP);}})
|
||||
|
||||
|
||||
|
||||
|
||||
STD_CMPJUMPNEWRS(cmpeqi_t,"cmp.eq(Ns8.new,#U5)",(fNEWREG(NsN)==(UiV)))
|
||||
STD_CMPJUMPNEWRS(cmpeqi_f,"!cmp.eq(Ns8.new,#U5)",(fNEWREG(NsN)!=(UiV)))
|
||||
STD_CMPJUMPNEWRS(cmpgti_t,"cmp.gt(Ns8.new,#U5)",(fNEWREG(NsN)>(UiV)))
|
||||
STD_CMPJUMPNEWRS(cmpgti_f,"!cmp.gt(Ns8.new,#U5)",!(fNEWREG(NsN)>(UiV)))
|
||||
STD_CMPJUMPNEWRS(cmpgtui_t,"cmp.gtu(Ns8.new,#U5)",(fCAST4u(fNEWREG(NsN))>(UiV)))
|
||||
STD_CMPJUMPNEWRS(cmpgtui_f,"!cmp.gtu(Ns8.new,#U5)",!(fCAST4u(fNEWREG(NsN))>(UiV)))
|
||||
|
||||
|
||||
STD_CMPJUMPNEWRS(cmpeqn1_t,"cmp.eq(Ns8.new,#-1)",(fNEWREG(NsN)==(-1)))
|
||||
STD_CMPJUMPNEWRS(cmpeqn1_f,"!cmp.eq(Ns8.new,#-1)",(fNEWREG(NsN)!=(-1)))
|
||||
STD_CMPJUMPNEWRS(cmpgtn1_t,"cmp.gt(Ns8.new,#-1)",(fNEWREG(NsN)>(-1)))
|
||||
STD_CMPJUMPNEWRS(cmpgtn1_f,"!cmp.gt(Ns8.new,#-1)",!(fNEWREG(NsN)>(-1)))
|
||||
STD_CMPJUMPNEWRS(tstbit0_t,"tstbit(Ns8.new,#0)",((fNEWREG(NsN)) & 1))
|
||||
STD_CMPJUMPNEWRS(tstbit0_f,"!tstbit(Ns8.new,#0)",!((fNEWREG(NsN)) & 1))
|
||||
|
||||
|
||||
STD_CMPJUMPNEWRS(cmpeq_t, "cmp.eq(Ns8.new,Rt32)", (fNEWREG(NsN)==RtV))
|
||||
STD_CMPJUMPNEWRS(cmpgt_t, "cmp.gt(Ns8.new,Rt32)", (fNEWREG(NsN)>RtV))
|
||||
STD_CMPJUMPNEWRS(cmpgtu_t,"cmp.gtu(Ns8.new,Rt32)",(fCAST4u(fNEWREG(NsN))>fCAST4u(RtV)))
|
||||
STD_CMPJUMPNEWRS(cmplt_t, "cmp.gt(Rt32,Ns8.new)", (RtV>fNEWREG(NsN)))
|
||||
STD_CMPJUMPNEWRS(cmpltu_t,"cmp.gtu(Rt32,Ns8.new)",(fCAST4u(RtV)>fCAST4u(fNEWREG(NsN))))
|
||||
STD_CMPJUMPNEWRS(cmpeq_f, "!cmp.eq(Ns8.new,Rt32)", (fNEWREG(NsN)!=RtV))
|
||||
STD_CMPJUMPNEWRS(cmpgt_f, "!cmp.gt(Ns8.new,Rt32)", !(fNEWREG(NsN)>RtV))
|
||||
STD_CMPJUMPNEWRS(cmpgtu_f,"!cmp.gtu(Ns8.new,Rt32)",!(fCAST4u(fNEWREG(NsN))>fCAST4u(RtV)))
|
||||
STD_CMPJUMPNEWRS(cmplt_f, "!cmp.gt(Rt32,Ns8.new)", !(RtV>fNEWREG(NsN)))
|
||||
STD_CMPJUMPNEWRS(cmpltu_f,"!cmp.gtu(Rt32,Ns8.new)",!(fCAST4u(RtV)>fCAST4u(fNEWREG(NsN))))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*********************************************/
|
||||
/* Subroutine Call instructions */
|
||||
/*********************************************/
|
||||
|
||||
#define CDIR_STD A_CALL
|
||||
#define CINDIR_STD A_CALL,A_INDIRECT
|
||||
|
||||
Q6INSN(J2_call,"call #r22:2",ATTRIBS(CDIR_STD), "direct unconditional call",
|
||||
{fIMMEXT(riV); fPCALIGN(riV); fCALL(fREAD_PC()+riV); })
|
||||
|
||||
Q6INSN(J2_callt,"if (Pu4) call #r15:2",ATTRIBS(CDIR_STD),"direct conditional call if true",
|
||||
{fIMMEXT(riV); fPCALIGN(riV); fBRANCH_SPECULATE_STALL(fLSBOLD(PuV),,SPECULATE_NOT_TAKEN,12,0); if (fLSBOLD(PuV)) { fCALL(fREAD_PC()+riV); }})
|
||||
|
||||
Q6INSN(J2_callf,"if (!Pu4) call #r15:2",ATTRIBS(CDIR_STD),"direct conditional call if false",
|
||||
{fIMMEXT(riV); fPCALIGN(riV); fBRANCH_SPECULATE_STALL(fLSBOLDNOT(PuV),,SPECULATE_NOT_TAKEN,12,0);if (fLSBOLDNOT(PuV)) { fCALL(fREAD_PC()+riV); }})
|
||||
|
||||
Q6INSN(J2_callr,"callr Rs32",ATTRIBS(CINDIR_STD), "indirect unconditional call",
|
||||
{ fCALLR(RsV); })
|
||||
|
||||
Q6INSN(J2_callrt,"if (Pu4) callr Rs32",ATTRIBS(CINDIR_STD),"indirect conditional call if true",
|
||||
{fBRANCH_SPECULATE_STALL(fLSBOLD(PuV),,SPECULATE_NOT_TAKEN,12,0);if (fLSBOLD(PuV)) { fCALLR(RsV); }})
|
||||
|
||||
Q6INSN(J2_callrf,"if (!Pu4) callr Rs32",ATTRIBS(CINDIR_STD),"indirect conditional call if false",
|
||||
{fBRANCH_SPECULATE_STALL(fLSBOLDNOT(PuV),,SPECULATE_NOT_TAKEN,12,0);if (fLSBOLDNOT(PuV)) { fCALLR(RsV); }})
|
||||
|
||||
|
||||
|
||||
|
||||
/*********************************************/
|
||||
/* HW Loop instructions */
|
||||
/*********************************************/
|
||||
|
||||
Q6INSN(J2_loop0r,"loop0(#r7:2,Rs32)",ATTRIBS(),"Initialize HW loop 0",
|
||||
{ fIMMEXT(riV); fPCALIGN(riV);
|
||||
fWRITE_LOOP_REGS0(/*sa,lc*/ fREAD_PC()+riV, RsV);
|
||||
fSET_LPCFG(0);
|
||||
})
|
||||
|
||||
Q6INSN(J2_loop1r,"loop1(#r7:2,Rs32)",ATTRIBS(),"Initialize HW loop 1",
|
||||
{ fIMMEXT(riV); fPCALIGN(riV);
|
||||
fWRITE_LOOP_REGS1(/*sa,lc*/ fREAD_PC()+riV, RsV);
|
||||
})
|
||||
|
||||
Q6INSN(J2_loop0i,"loop0(#r7:2,#U10)",ATTRIBS(),"Initialize HW loop 0",
|
||||
{ fIMMEXT(riV); fPCALIGN(riV);
|
||||
fWRITE_LOOP_REGS0(/*sa,lc*/ fREAD_PC()+riV, UiV);
|
||||
fSET_LPCFG(0);
|
||||
})
|
||||
|
||||
Q6INSN(J2_loop1i,"loop1(#r7:2,#U10)",ATTRIBS(),"Initialize HW loop 1",
|
||||
{ fIMMEXT(riV); fPCALIGN(riV);
|
||||
fWRITE_LOOP_REGS1(/*sa,lc*/ fREAD_PC()+riV, UiV);
|
||||
})
|
||||
|
||||
|
||||
Q6INSN(J2_ploop1sr,"p3=sp1loop0(#r7:2,Rs32)",ATTRIBS(A_ARCHV2),"Initialize HW loop 0",
|
||||
{ fIMMEXT(riV); fPCALIGN(riV);
|
||||
fWRITE_LOOP_REGS0(/*sa,lc*/ fREAD_PC()+riV, RsV);
|
||||
fSET_LPCFG(1);
|
||||
fWRITE_P3(0);
|
||||
})
|
||||
Q6INSN(J2_ploop1si,"p3=sp1loop0(#r7:2,#U10)",ATTRIBS(A_ARCHV2),"Initialize HW loop 0",
|
||||
{ fIMMEXT(riV); fPCALIGN(riV);
|
||||
fWRITE_LOOP_REGS0(/*sa,lc*/ fREAD_PC()+riV, UiV);
|
||||
fSET_LPCFG(1);
|
||||
fWRITE_P3(0);
|
||||
})
|
||||
|
||||
Q6INSN(J2_ploop2sr,"p3=sp2loop0(#r7:2,Rs32)",ATTRIBS(A_ARCHV2),"Initialize HW loop 0",
|
||||
{ fIMMEXT(riV); fPCALIGN(riV);
|
||||
fWRITE_LOOP_REGS0(/*sa,lc*/ fREAD_PC()+riV, RsV);
|
||||
fSET_LPCFG(2);
|
||||
fWRITE_P3(0);
|
||||
})
|
||||
Q6INSN(J2_ploop2si,"p3=sp2loop0(#r7:2,#U10)",ATTRIBS(A_ARCHV2),"Initialize HW loop 0",
|
||||
{ fIMMEXT(riV); fPCALIGN(riV);
|
||||
fWRITE_LOOP_REGS0(/*sa,lc*/ fREAD_PC()+riV, UiV);
|
||||
fSET_LPCFG(2);
|
||||
fWRITE_P3(0);
|
||||
})
|
||||
|
||||
Q6INSN(J2_ploop3sr,"p3=sp3loop0(#r7:2,Rs32)",ATTRIBS(A_ARCHV2),"Initialize HW loop 0",
|
||||
{ fIMMEXT(riV); fPCALIGN(riV);
|
||||
fWRITE_LOOP_REGS0(/*sa,lc*/ fREAD_PC()+riV, RsV);
|
||||
fSET_LPCFG(3);
|
||||
fWRITE_P3(0);
|
||||
})
|
||||
Q6INSN(J2_ploop3si,"p3=sp3loop0(#r7:2,#U10)",ATTRIBS(A_ARCHV2),"Initialize HW loop 0",
|
||||
{ fIMMEXT(riV); fPCALIGN(riV);
|
||||
fWRITE_LOOP_REGS0(/*sa,lc*/ fREAD_PC()+riV, UiV);
|
||||
fSET_LPCFG(3);
|
||||
fWRITE_P3(0);
|
||||
})
|
||||
|
||||
|
||||
|
||||
Q6INSN(J2_endloop01,"endloop01",ATTRIBS(A_HWLOOP0_END,A_HWLOOP1_END),"Loopend for inner and outer loop",
|
||||
{
|
||||
|
||||
/* V2: With predicate control */
|
||||
if (fGET_LPCFG) {
|
||||
fHIDE( if (fGET_LPCFG >= 2) { /* Nothing */ } else )
|
||||
if (fGET_LPCFG==1) {
|
||||
fWRITE_P3(0xff);
|
||||
}
|
||||
fSET_LPCFG(fGET_LPCFG-1);
|
||||
}
|
||||
|
||||
/* check if iterate */
|
||||
if (fREAD_LC0>1) {
|
||||
fBRANCH(fREAD_SA0,COF_TYPE_LOOPEND0);
|
||||
/* decrement loop count */
|
||||
fWRITE_LC0(fREAD_LC0-1);
|
||||
} else {
|
||||
/* check if iterate */
|
||||
if (fREAD_LC1>1) {
|
||||
fBRANCH(fREAD_SA1,COF_TYPE_LOOPEND1);
|
||||
/* decrement loop count */
|
||||
fWRITE_LC1(fREAD_LC1-1);
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
Q6INSN(J2_endloop0,"endloop0",ATTRIBS(A_HWLOOP0_END),"Loopend for inner loop",
|
||||
{
|
||||
|
||||
/* V2: With predicate control */
|
||||
if (fGET_LPCFG) {
|
||||
fHIDE( if (fGET_LPCFG >= 2) { /* Nothing */ } else )
|
||||
if (fGET_LPCFG==1) {
|
||||
fWRITE_P3(0xff);
|
||||
}
|
||||
fSET_LPCFG(fGET_LPCFG-1);
|
||||
}
|
||||
|
||||
/* check if iterate */
|
||||
if (fREAD_LC0>1) {
|
||||
fBRANCH(fREAD_SA0,COF_TYPE_LOOPEND0);
|
||||
/* decrement loop count */
|
||||
fWRITE_LC0(fREAD_LC0-1);
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(J2_endloop1,"endloop1",ATTRIBS(A_HWLOOP1_END),"Loopend for outer loop",
|
||||
{
|
||||
/* check if iterate */
|
||||
if (fREAD_LC1>1) {
|
||||
fBRANCH(fREAD_SA1,COF_TYPE_LOOPEND1);
|
||||
/* decrement loop count */
|
||||
fWRITE_LC1(fREAD_LC1-1);
|
||||
}
|
||||
})
|
619
target/hexagon/imported/compare.idef
Normal file
619
target/hexagon/imported/compare.idef
Normal file
@ -0,0 +1,619 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Compare Instructions
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*********************************************/
|
||||
/* Scalar compare instructions */
|
||||
/*********************************************/
|
||||
|
||||
Q6INSN(C2_cmpeq,"Pd4=cmp.eq(Rs32,Rt32)",ATTRIBS(),
|
||||
"Compare for Equal",
|
||||
{PdV=f8BITSOF(RsV==RtV);})
|
||||
|
||||
Q6INSN(C2_cmpgt,"Pd4=cmp.gt(Rs32,Rt32)",ATTRIBS(),
|
||||
"Compare for signed Greater Than",
|
||||
{PdV=f8BITSOF(RsV>RtV);})
|
||||
|
||||
Q6INSN(C2_cmpgtu,"Pd4=cmp.gtu(Rs32,Rt32)",ATTRIBS(),
|
||||
"Compare for Greater Than Unsigned",
|
||||
{PdV=f8BITSOF(fCAST4u(RsV)>fCAST4u(RtV));})
|
||||
|
||||
Q6INSN(C2_cmpeqp,"Pd4=cmp.eq(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare for Equal",
|
||||
{PdV=f8BITSOF(RssV==RttV);})
|
||||
|
||||
Q6INSN(C2_cmpgtp,"Pd4=cmp.gt(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare for signed Greater Than",
|
||||
{PdV=f8BITSOF(RssV>RttV);})
|
||||
|
||||
Q6INSN(C2_cmpgtup,"Pd4=cmp.gtu(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare for Greater Than Unsigned",
|
||||
{PdV=f8BITSOF(fCAST8u(RssV)>fCAST8u(RttV));})
|
||||
|
||||
|
||||
|
||||
|
||||
/*********************************************/
|
||||
/* Compare and put result in GPR */
|
||||
/* typically for function I/O */
|
||||
/*********************************************/
|
||||
|
||||
Q6INSN(A4_rcmpeqi,"Rd32=cmp.eq(Rs32,#s8)",ATTRIBS(),
|
||||
"Compare for Equal",
|
||||
{fIMMEXT(siV); RdV=(RsV==siV); })
|
||||
|
||||
Q6INSN(A4_rcmpneqi,"Rd32=!cmp.eq(Rs32,#s8)",ATTRIBS(),
|
||||
"Compare for Equal",
|
||||
{fIMMEXT(siV); RdV=(RsV!=siV); })
|
||||
|
||||
|
||||
Q6INSN(A4_rcmpeq,"Rd32=cmp.eq(Rs32,Rt32)",ATTRIBS(),
|
||||
"Compare for Equal",
|
||||
{RdV=(RsV==RtV); })
|
||||
|
||||
Q6INSN(A4_rcmpneq,"Rd32=!cmp.eq(Rs32,Rt32)",ATTRIBS(),
|
||||
"Compare for Equal",
|
||||
{RdV=(RsV!=RtV); })
|
||||
|
||||
|
||||
|
||||
/*********************************************/
|
||||
/* Scalar compare instructions */
|
||||
/*********************************************/
|
||||
|
||||
|
||||
Q6INSN(C2_bitsset,"Pd4=bitsset(Rs32,Rt32)",ATTRIBS(A_ARCHV2),
|
||||
"Compare for selected bits set",
|
||||
{PdV=f8BITSOF((RsV&RtV)==RtV);})
|
||||
|
||||
Q6INSN(C2_bitsclr,"Pd4=bitsclr(Rs32,Rt32)",ATTRIBS(A_ARCHV2),
|
||||
"Compare for selected bits clear",
|
||||
{PdV=f8BITSOF((RsV&RtV)==0);})
|
||||
|
||||
|
||||
Q6INSN(C4_nbitsset,"Pd4=!bitsset(Rs32,Rt32)",ATTRIBS(A_ARCHV2),
|
||||
"Compare for selected bits set",
|
||||
{PdV=f8BITSOF((RsV&RtV)!=RtV);})
|
||||
|
||||
Q6INSN(C4_nbitsclr,"Pd4=!bitsclr(Rs32,Rt32)",ATTRIBS(A_ARCHV2),
|
||||
"Compare for selected bits clear",
|
||||
{PdV=f8BITSOF((RsV&RtV)!=0);})
|
||||
|
||||
|
||||
|
||||
/*********************************************/
|
||||
/* Scalar compare instructions W/ immediate */
|
||||
/*********************************************/
|
||||
|
||||
Q6INSN(C2_cmpeqi,"Pd4=cmp.eq(Rs32,#s10)",ATTRIBS(),
|
||||
"Compare for Equal",
|
||||
{fIMMEXT(siV); PdV=f8BITSOF(RsV==siV);})
|
||||
|
||||
Q6INSN(C2_cmpgti,"Pd4=cmp.gt(Rs32,#s10)",ATTRIBS(),
|
||||
"Compare for signed Greater Than",
|
||||
{fIMMEXT(siV); PdV=f8BITSOF(RsV>siV);})
|
||||
|
||||
Q6INSN(C2_cmpgtui,"Pd4=cmp.gtu(Rs32,#u9)",ATTRIBS(),
|
||||
"Compare for Greater Than Unsigned",
|
||||
{fIMMEXT(uiV); PdV=f8BITSOF(fCAST4u(RsV)>fCAST4u(uiV));})
|
||||
|
||||
Q6INSN(C2_bitsclri,"Pd4=bitsclr(Rs32,#u6)",ATTRIBS(A_ARCHV2),
|
||||
"Compare for selected bits clear",
|
||||
{PdV=f8BITSOF((RsV&uiV)==0);})
|
||||
|
||||
Q6INSN(C4_nbitsclri,"Pd4=!bitsclr(Rs32,#u6)",ATTRIBS(A_ARCHV2),
|
||||
"Compare for selected bits clear",
|
||||
{PdV=f8BITSOF((RsV&uiV)!=0);})
|
||||
|
||||
|
||||
|
||||
|
||||
Q6INSN(C4_cmpneqi,"Pd4=!cmp.eq(Rs32,#s10)",ATTRIBS(), "Compare for Not Equal", {fIMMEXT(siV); PdV=f8BITSOF(RsV!=siV);})
|
||||
Q6INSN(C4_cmpltei,"Pd4=!cmp.gt(Rs32,#s10)",ATTRIBS(), "Compare for Less Than or Equal", {fIMMEXT(siV); PdV=f8BITSOF(RsV<=siV);})
|
||||
Q6INSN(C4_cmplteui,"Pd4=!cmp.gtu(Rs32,#u9)",ATTRIBS(), "Compare for Less Than or Equal Unsigned", {fIMMEXT(uiV); PdV=f8BITSOF(fCAST4u(RsV)<=fCAST4u(uiV));})
|
||||
|
||||
Q6INSN(C4_cmpneq,"Pd4=!cmp.eq(Rs32,Rt32)",ATTRIBS(), "And-Compare for Equal", {PdV=f8BITSOF(RsV!=RtV);})
|
||||
Q6INSN(C4_cmplte,"Pd4=!cmp.gt(Rs32,Rt32)",ATTRIBS(), "And-Compare for signed Greater Than", {PdV=f8BITSOF(RsV<=RtV);})
|
||||
Q6INSN(C4_cmplteu,"Pd4=!cmp.gtu(Rs32,Rt32)",ATTRIBS(), "And-Compare for Greater Than Unsigned", {PdV=f8BITSOF(fCAST4u(RsV)<=fCAST4u(RtV));})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Predicate Logical Operations */
|
||||
|
||||
Q6INSN(C2_and,"Pd4=and(Pt4,Ps4)",ATTRIBS(A_CRSLOT23),
|
||||
"Predicate AND",
|
||||
{PdV=PsV & PtV;})
|
||||
|
||||
Q6INSN(C2_or,"Pd4=or(Pt4,Ps4)",ATTRIBS(A_CRSLOT23),
|
||||
"Predicate OR",
|
||||
{PdV=PsV | PtV;})
|
||||
|
||||
Q6INSN(C2_xor,"Pd4=xor(Ps4,Pt4)",ATTRIBS(A_CRSLOT23),
|
||||
"Predicate XOR",
|
||||
{PdV=PsV ^ PtV;})
|
||||
|
||||
Q6INSN(C2_andn,"Pd4=and(Pt4,!Ps4)",ATTRIBS(A_CRSLOT23),
|
||||
"Predicate AND NOT",
|
||||
{PdV=PtV & (~PsV);})
|
||||
|
||||
Q6INSN(C2_not,"Pd4=not(Ps4)",ATTRIBS(A_CRSLOT23),
|
||||
"Logical NOT Predicate",
|
||||
{PdV=~PsV;})
|
||||
|
||||
Q6INSN(C2_orn,"Pd4=or(Pt4,!Ps4)",ATTRIBS(A_ARCHV2,A_CRSLOT23),
|
||||
"Predicate OR NOT",
|
||||
{PdV=PtV | (~PsV);})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Q6INSN(C4_and_and,"Pd4=and(Ps4,and(Pt4,Pu4))",ATTRIBS(A_CRSLOT23),
|
||||
"Compound And-And", { PdV = PsV & PtV & PuV; })
|
||||
|
||||
Q6INSN(C4_and_or,"Pd4=and(Ps4,or(Pt4,Pu4))",ATTRIBS(A_CRSLOT23),
|
||||
"Compound And-Or", { PdV = PsV & (PtV | PuV); })
|
||||
|
||||
Q6INSN(C4_or_and,"Pd4=or(Ps4,and(Pt4,Pu4))",ATTRIBS(A_CRSLOT23),
|
||||
"Compound Or-And", { PdV = PsV | (PtV & PuV); })
|
||||
|
||||
Q6INSN(C4_or_or,"Pd4=or(Ps4,or(Pt4,Pu4))",ATTRIBS(A_CRSLOT23),
|
||||
"Compound Or-Or", { PdV = PsV | PtV | PuV; })
|
||||
|
||||
|
||||
|
||||
Q6INSN(C4_and_andn,"Pd4=and(Ps4,and(Pt4,!Pu4))",ATTRIBS(A_CRSLOT23),
|
||||
"Compound And-And", { PdV = PsV & PtV & (~PuV); })
|
||||
|
||||
Q6INSN(C4_and_orn,"Pd4=and(Ps4,or(Pt4,!Pu4))",ATTRIBS(A_CRSLOT23),
|
||||
"Compound And-Or", { PdV = PsV & (PtV | (~PuV)); })
|
||||
|
||||
Q6INSN(C4_or_andn,"Pd4=or(Ps4,and(Pt4,!Pu4))",ATTRIBS(A_CRSLOT23),
|
||||
"Compound Or-And", { PdV = PsV | (PtV & (~PuV)); })
|
||||
|
||||
Q6INSN(C4_or_orn,"Pd4=or(Ps4,or(Pt4,!Pu4))",ATTRIBS(A_CRSLOT23),
|
||||
"Compound Or-Or", { PdV = PsV | PtV | (~PuV); })
|
||||
|
||||
|
||||
Q6INSN(C2_any8,"Pd4=any8(Ps4)",ATTRIBS(A_CRSLOT23),
|
||||
"Logical ANY of low 8 predicate bits",
|
||||
{ PsV ? (PdV=0xff) : (PdV=0x00); })
|
||||
|
||||
Q6INSN(C2_all8,"Pd4=all8(Ps4)",ATTRIBS(A_CRSLOT23),
|
||||
"Logical ALL of low 8 predicate bits",
|
||||
{ (PsV==0xff) ? (PdV=0xff) : (PdV=0x00); })
|
||||
|
||||
Q6INSN(C2_vitpack,"Rd32=vitpack(Ps4,Pt4)",ATTRIBS(),
|
||||
"Pack the odd and even bits of two predicate registers",
|
||||
{ RdV = (PsV&0x55) | (PtV&0xAA); })
|
||||
|
||||
/* Mux instructions */
|
||||
|
||||
Q6INSN(C2_mux,"Rd32=mux(Pu4,Rs32,Rt32)",ATTRIBS(),
|
||||
"Scalar MUX",
|
||||
{ (fLSBOLD(PuV)) ? (RdV=RsV):(RdV=RtV); })
|
||||
|
||||
|
||||
Q6INSN(C2_cmovenewit,"if (Pu4.new) Rd32=#s12",ATTRIBS(A_ARCHV2),
|
||||
"Scalar conditional move",
|
||||
{ fIMMEXT(siV); if (fLSBNEW(PuN)) RdV=siV; else CANCEL;})
|
||||
|
||||
Q6INSN(C2_cmovenewif,"if (!Pu4.new) Rd32=#s12",ATTRIBS(A_ARCHV2),
|
||||
"Scalar conditional move",
|
||||
{ fIMMEXT(siV); if (fLSBNEWNOT(PuN)) RdV=siV; else CANCEL;})
|
||||
|
||||
Q6INSN(C2_cmoveit,"if (Pu4) Rd32=#s12",ATTRIBS(A_ARCHV2),
|
||||
"Scalar conditional move",
|
||||
{ fIMMEXT(siV); if (fLSBOLD(PuV)) RdV=siV; else CANCEL;})
|
||||
|
||||
Q6INSN(C2_cmoveif,"if (!Pu4) Rd32=#s12",ATTRIBS(A_ARCHV2),
|
||||
"Scalar conditional move",
|
||||
{ fIMMEXT(siV); if (fLSBOLDNOT(PuV)) RdV=siV; else CANCEL;})
|
||||
|
||||
|
||||
|
||||
Q6INSN(C2_ccombinewnewt,"if (Pu4.new) Rdd32=combine(Rs32,Rt32)",ATTRIBS(A_ARCHV2),
|
||||
"Conditionally combine two words into a register pair",
|
||||
{ if (fLSBNEW(PuN)) {
|
||||
fSETWORD(0,RddV,RtV);
|
||||
fSETWORD(1,RddV,RsV);
|
||||
} else {CANCEL;}
|
||||
})
|
||||
|
||||
Q6INSN(C2_ccombinewnewf,"if (!Pu4.new) Rdd32=combine(Rs32,Rt32)",ATTRIBS(A_ARCHV2),
|
||||
"Conditionally combine two words into a register pair",
|
||||
{ if (fLSBNEWNOT(PuN)) {
|
||||
fSETWORD(0,RddV,RtV);
|
||||
fSETWORD(1,RddV,RsV);
|
||||
} else {CANCEL;}
|
||||
})
|
||||
|
||||
Q6INSN(C2_ccombinewt,"if (Pu4) Rdd32=combine(Rs32,Rt32)",ATTRIBS(A_ARCHV2),
|
||||
"Conditionally combine two words into a register pair",
|
||||
{ if (fLSBOLD(PuV)) {
|
||||
fSETWORD(0,RddV,RtV);
|
||||
fSETWORD(1,RddV,RsV);
|
||||
} else {CANCEL;}
|
||||
})
|
||||
|
||||
Q6INSN(C2_ccombinewf,"if (!Pu4) Rdd32=combine(Rs32,Rt32)",ATTRIBS(A_ARCHV2),
|
||||
"Conditionally combine two words into a register pair",
|
||||
{ if (fLSBOLDNOT(PuV)) {
|
||||
fSETWORD(0,RddV,RtV);
|
||||
fSETWORD(1,RddV,RsV);
|
||||
} else {CANCEL;}
|
||||
})
|
||||
|
||||
|
||||
|
||||
Q6INSN(C2_muxii,"Rd32=mux(Pu4,#s8,#S8)",ATTRIBS(A_ARCHV2),
|
||||
"Scalar MUX immediates",
|
||||
{ fIMMEXT(siV); (fLSBOLD(PuV)) ? (RdV=siV):(RdV=SiV); })
|
||||
|
||||
|
||||
|
||||
Q6INSN(C2_muxir,"Rd32=mux(Pu4,Rs32,#s8)",ATTRIBS(A_ARCHV2),
|
||||
"Scalar MUX register immediate",
|
||||
{ fIMMEXT(siV); (fLSBOLD(PuV)) ? (RdV=RsV):(RdV=siV); })
|
||||
|
||||
|
||||
Q6INSN(C2_muxri,"Rd32=mux(Pu4,#s8,Rs32)",ATTRIBS(A_ARCHV2),
|
||||
"Scalar MUX register immediate",
|
||||
{ fIMMEXT(siV); (fLSBOLD(PuV)) ? (RdV=siV):(RdV=RsV); })
|
||||
|
||||
|
||||
|
||||
Q6INSN(C2_vmux,"Rdd32=vmux(Pu4,Rss32,Rtt32)",ATTRIBS(),
|
||||
"Vector MUX",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 8; i++) {
|
||||
fSETBYTE(i,RddV,(fGETBIT(i,PuV)?(fGETBYTE(i,RssV)):(fGETBYTE(i,RttV))));
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(C2_mask,"Rdd32=mask(Pt4)",ATTRIBS(),
|
||||
"Vector Mask Generation",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 8; i++) {
|
||||
fSETBYTE(i,RddV,(fGETBIT(i,PtV)?(0xff):(0x00)));
|
||||
}
|
||||
})
|
||||
|
||||
/* VCMP */
|
||||
|
||||
Q6INSN(A2_vcmpbeq,"Pd4=vcmpb.eq(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 8; i++) {
|
||||
fSETBIT(i,PdV,(fGETBYTE(i,RssV) == fGETBYTE(i,RttV)));
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(A4_vcmpbeqi,"Pd4=vcmpb.eq(Rss32,#u8)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 8; i++) {
|
||||
fSETBIT(i,PdV,(fGETUBYTE(i,RssV) == uiV));
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(A4_vcmpbeq_any,"Pd4=any8(vcmpb.eq(Rss32,Rtt32))",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
PdV = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (fGETBYTE(i,RssV) == fGETBYTE(i,RttV)) PdV = 0xff;
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(A6_vcmpbeq_notany,"Pd4=!any8(vcmpb.eq(Rss32,Rtt32))",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
PdV = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (fGETBYTE(i,RssV) == fGETBYTE(i,RttV)) PdV = 0xff;
|
||||
}
|
||||
PdV = ~PdV;
|
||||
})
|
||||
|
||||
Q6INSN(A2_vcmpbgtu,"Pd4=vcmpb.gtu(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 8; i++) {
|
||||
fSETBIT(i,PdV,(fGETUBYTE(i,RssV) > fGETUBYTE(i,RttV)));
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(A4_vcmpbgtui,"Pd4=vcmpb.gtu(Rss32,#u7)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 8; i++) {
|
||||
fSETBIT(i,PdV,(fGETUBYTE(i,RssV) > uiV));
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(A4_vcmpbgt,"Pd4=vcmpb.gt(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 8; i++) {
|
||||
fSETBIT(i,PdV,(fGETBYTE(i,RssV) > fGETBYTE(i,RttV)));
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(A4_vcmpbgti,"Pd4=vcmpb.gt(Rss32,#s8)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 8; i++) {
|
||||
fSETBIT(i,PdV,(fGETBYTE(i,RssV) > siV));
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
Q6INSN(A4_cmpbeq,"Pd4=cmpb.eq(Rs32,Rt32)",ATTRIBS(),
|
||||
"Compare bytes ",
|
||||
{
|
||||
PdV=f8BITSOF(fGETBYTE(0,RsV) == fGETBYTE(0,RtV));
|
||||
})
|
||||
|
||||
Q6INSN(A4_cmpbeqi,"Pd4=cmpb.eq(Rs32,#u8)",ATTRIBS(),
|
||||
"Compare bytes ",
|
||||
{
|
||||
PdV=f8BITSOF(fGETUBYTE(0,RsV) == uiV);
|
||||
})
|
||||
|
||||
Q6INSN(A4_cmpbgtu,"Pd4=cmpb.gtu(Rs32,Rt32)",ATTRIBS(),
|
||||
"Compare bytes ",
|
||||
{
|
||||
PdV=f8BITSOF(fGETUBYTE(0,RsV) > fGETUBYTE(0,RtV));
|
||||
})
|
||||
|
||||
Q6INSN(A4_cmpbgtui,"Pd4=cmpb.gtu(Rs32,#u7)",ATTRIBS(),
|
||||
"Compare bytes ",
|
||||
{
|
||||
fIMMEXT(uiV);
|
||||
PdV=f8BITSOF(fGETUBYTE(0,RsV) > fCAST4u(uiV));
|
||||
})
|
||||
|
||||
Q6INSN(A4_cmpbgt,"Pd4=cmpb.gt(Rs32,Rt32)",ATTRIBS(),
|
||||
"Compare bytes ",
|
||||
{
|
||||
PdV=f8BITSOF(fGETBYTE(0,RsV) > fGETBYTE(0,RtV));
|
||||
})
|
||||
|
||||
Q6INSN(A4_cmpbgti,"Pd4=cmpb.gt(Rs32,#s8)",ATTRIBS(),
|
||||
"Compare bytes ",
|
||||
{
|
||||
PdV=f8BITSOF(fGETBYTE(0,RsV) > siV);
|
||||
})
|
||||
|
||||
Q6INSN(A2_vcmpheq,"Pd4=vcmph.eq(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 4; i++) {
|
||||
fSETBIT(i*2,PdV, (fGETHALF(i,RssV) == fGETHALF(i,RttV)));
|
||||
fSETBIT(i*2+1,PdV,(fGETHALF(i,RssV) == fGETHALF(i,RttV)));
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(A2_vcmphgt,"Pd4=vcmph.gt(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 4; i++) {
|
||||
fSETBIT(i*2, PdV, (fGETHALF(i,RssV) > fGETHALF(i,RttV)));
|
||||
fSETBIT(i*2+1,PdV, (fGETHALF(i,RssV) > fGETHALF(i,RttV)));
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(A2_vcmphgtu,"Pd4=vcmph.gtu(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 4; i++) {
|
||||
fSETBIT(i*2, PdV, (fGETUHALF(i,RssV) > fGETUHALF(i,RttV)));
|
||||
fSETBIT(i*2+1,PdV, (fGETUHALF(i,RssV) > fGETUHALF(i,RttV)));
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(A4_vcmpheqi,"Pd4=vcmph.eq(Rss32,#s8)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 4; i++) {
|
||||
fSETBIT(i*2,PdV, (fGETHALF(i,RssV) == siV));
|
||||
fSETBIT(i*2+1,PdV,(fGETHALF(i,RssV) == siV));
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(A4_vcmphgti,"Pd4=vcmph.gt(Rss32,#s8)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 4; i++) {
|
||||
fSETBIT(i*2, PdV, (fGETHALF(i,RssV) > siV));
|
||||
fSETBIT(i*2+1,PdV, (fGETHALF(i,RssV) > siV));
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Q6INSN(A4_vcmphgtui,"Pd4=vcmph.gtu(Rss32,#u7)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fHIDE(int i;)
|
||||
for (i = 0; i < 4; i++) {
|
||||
fSETBIT(i*2, PdV, (fGETUHALF(i,RssV) > uiV));
|
||||
fSETBIT(i*2+1,PdV, (fGETUHALF(i,RssV) > uiV));
|
||||
}
|
||||
})
|
||||
|
||||
Q6INSN(A4_cmpheq,"Pd4=cmph.eq(Rs32,Rt32)",ATTRIBS(),
|
||||
"Compare halfwords ",
|
||||
{
|
||||
PdV=f8BITSOF(fGETHALF(0,RsV) == fGETHALF(0,RtV));
|
||||
})
|
||||
|
||||
Q6INSN(A4_cmphgt,"Pd4=cmph.gt(Rs32,Rt32)",ATTRIBS(),
|
||||
"Compare halfwords ",
|
||||
{
|
||||
PdV=f8BITSOF(fGETHALF(0,RsV) > fGETHALF(0,RtV));
|
||||
})
|
||||
|
||||
Q6INSN(A4_cmphgtu,"Pd4=cmph.gtu(Rs32,Rt32)",ATTRIBS(),
|
||||
"Compare halfwords ",
|
||||
{
|
||||
PdV=f8BITSOF(fGETUHALF(0,RsV) > fGETUHALF(0,RtV));
|
||||
})
|
||||
|
||||
Q6INSN(A4_cmpheqi,"Pd4=cmph.eq(Rs32,#s8)",ATTRIBS(),
|
||||
"Compare halfwords ",
|
||||
{
|
||||
fIMMEXT(siV);
|
||||
PdV=f8BITSOF(fGETHALF(0,RsV) == siV);
|
||||
})
|
||||
|
||||
Q6INSN(A4_cmphgti,"Pd4=cmph.gt(Rs32,#s8)",ATTRIBS(),
|
||||
"Compare halfwords ",
|
||||
{
|
||||
fIMMEXT(siV);
|
||||
PdV=f8BITSOF(fGETHALF(0,RsV) > siV);
|
||||
})
|
||||
|
||||
Q6INSN(A4_cmphgtui,"Pd4=cmph.gtu(Rs32,#u7)",ATTRIBS(),
|
||||
"Compare halfwords ",
|
||||
{
|
||||
fIMMEXT(uiV);
|
||||
PdV=f8BITSOF(fGETUHALF(0,RsV) > fCAST4u(uiV));
|
||||
})
|
||||
|
||||
Q6INSN(A2_vcmpweq,"Pd4=vcmpw.eq(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fSETBITS(3,0,PdV,(fGETWORD(0,RssV)==fGETWORD(0,RttV)));
|
||||
fSETBITS(7,4,PdV,(fGETWORD(1,RssV)==fGETWORD(1,RttV)));
|
||||
})
|
||||
|
||||
Q6INSN(A2_vcmpwgt,"Pd4=vcmpw.gt(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fSETBITS(3,0,PdV,(fGETWORD(0,RssV)>fGETWORD(0,RttV)));
|
||||
fSETBITS(7,4,PdV,(fGETWORD(1,RssV)>fGETWORD(1,RttV)));
|
||||
})
|
||||
|
||||
Q6INSN(A2_vcmpwgtu,"Pd4=vcmpw.gtu(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fSETBITS(3,0,PdV,(fGETUWORD(0,RssV)>fGETUWORD(0,RttV)));
|
||||
fSETBITS(7,4,PdV,(fGETUWORD(1,RssV)>fGETUWORD(1,RttV)));
|
||||
})
|
||||
|
||||
Q6INSN(A4_vcmpweqi,"Pd4=vcmpw.eq(Rss32,#s8)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fSETBITS(3,0,PdV,(fGETWORD(0,RssV)==siV));
|
||||
fSETBITS(7,4,PdV,(fGETWORD(1,RssV)==siV));
|
||||
})
|
||||
|
||||
Q6INSN(A4_vcmpwgti,"Pd4=vcmpw.gt(Rss32,#s8)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fSETBITS(3,0,PdV,(fGETWORD(0,RssV)>siV));
|
||||
fSETBITS(7,4,PdV,(fGETWORD(1,RssV)>siV));
|
||||
})
|
||||
|
||||
Q6INSN(A4_vcmpwgtui,"Pd4=vcmpw.gtu(Rss32,#u7)",ATTRIBS(),
|
||||
"Compare elements of two vectors ",
|
||||
{
|
||||
fSETBITS(3,0,PdV,(fGETUWORD(0,RssV)>fCAST4u(uiV)));
|
||||
fSETBITS(7,4,PdV,(fGETUWORD(1,RssV)>fCAST4u(uiV)));
|
||||
})
|
||||
|
||||
Q6INSN(A4_boundscheck_hi,"Pd4=boundscheck(Rss32,Rtt32):raw:hi",ATTRIBS(),
|
||||
"Detect if a register is within bounds",
|
||||
{
|
||||
fHIDE(size4u_t src;)
|
||||
src = fGETUWORD(1,RssV);
|
||||
PdV = f8BITSOF((fCAST4u(src) >= fGETUWORD(0,RttV)) && (fCAST4u(src) < fGETUWORD(1,RttV)));
|
||||
})
|
||||
|
||||
Q6INSN(A4_boundscheck_lo,"Pd4=boundscheck(Rss32,Rtt32):raw:lo",ATTRIBS(),
|
||||
"Detect if a register is within bounds",
|
||||
{
|
||||
fHIDE(size4u_t src;)
|
||||
src = fGETUWORD(0,RssV);
|
||||
PdV = f8BITSOF((fCAST4u(src) >= fGETUWORD(0,RttV)) && (fCAST4u(src) < fGETUWORD(1,RttV)));
|
||||
})
|
||||
|
||||
Q6INSN(A4_tlbmatch,"Pd4=tlbmatch(Rss32,Rt32)",ATTRIBS(),
|
||||
"Detect if a VA/ASID matches a TLB entry",
|
||||
{
|
||||
fHIDE(size4u_t TLBHI; size4u_t TLBLO; size4u_t MASK; size4u_t SIZE;)
|
||||
MASK = 0x07ffffff;
|
||||
TLBLO = fGETUWORD(0,RssV);
|
||||
TLBHI = fGETUWORD(1,RssV);
|
||||
SIZE = fMIN(6,fCL1_4(~fBREV_4(TLBLO)));
|
||||
MASK &= (0xffffffff << 2*SIZE);
|
||||
PdV = f8BITSOF(fGETBIT(31,TLBHI) && ((TLBHI & MASK) == (RtV & MASK)));
|
||||
})
|
||||
|
||||
Q6INSN(C2_tfrpr,"Rd32=Ps4",ATTRIBS(),
|
||||
"Transfer predicate to general register", { RdV = fZXTN(8,32,PsV); })
|
||||
|
||||
Q6INSN(C2_tfrrp,"Pd4=Rs32",ATTRIBS(),
|
||||
"Transfer general register to Predicate", { PdV = fGETUBYTE(0,RsV); })
|
||||
|
||||
Q6INSN(C4_fastcorner9,"Pd4=fastcorner9(Ps4,Pt4)",ATTRIBS(A_CRSLOT23),
|
||||
"Determine whether the predicate sources define a corner",
|
||||
{
|
||||
fHIDE(size4u_t tmp = 0; size4u_t i;)
|
||||
fSETHALF(0,tmp,(PsV<<8)|PtV);
|
||||
fSETHALF(1,tmp,(PsV<<8)|PtV);
|
||||
for (i = 1; i < 9; i++) {
|
||||
tmp &= tmp >> 1;
|
||||
}
|
||||
PdV = f8BITSOF(tmp != 0);
|
||||
})
|
||||
|
||||
Q6INSN(C4_fastcorner9_not,"Pd4=!fastcorner9(Ps4,Pt4)",ATTRIBS(A_CRSLOT23),
|
||||
"Determine whether the predicate sources define a corner",
|
||||
{
|
||||
fHIDE(size4u_t tmp = 0; size4u_t i;)
|
||||
fSETHALF(0,tmp,(PsV<<8)|PtV);
|
||||
fSETHALF(1,tmp,(PsV<<8)|PtV);
|
||||
for (i = 1; i < 9; i++) {
|
||||
tmp &= tmp >> 1;
|
||||
}
|
||||
PdV = f8BITSOF(tmp == 0);
|
||||
})
|
124
target/hexagon/imported/encode.def
Normal file
124
target/hexagon/imported/encode.def
Normal file
@ -0,0 +1,124 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This just includes all encoding files
|
||||
*/
|
||||
|
||||
#ifndef DEF_FIELD32
|
||||
#define __SELF_DEF_FIELD32
|
||||
#define DEF_FIELD32(...) /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef DEF_CLASS32
|
||||
#define __SELF_DEF_CLASS32
|
||||
#define DEF_CLASS32(...) /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef DEF_ANTICLASS32
|
||||
#define __SELF_DEF_ANTICLASS32
|
||||
#define DEF_ANTICLASS32(...) /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef LEGACY_DEF_ENC32
|
||||
#define __SELF_DEF_LEGACY_DEF_ENC32
|
||||
#define LEGACY_DEF_ENC32(...) /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef DEF_FIELDROW_DESC32
|
||||
#define __SELF_DEF_FIELDROW_DESC32
|
||||
#define DEF_FIELDROW_DESC32(...) /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef DEF_ENC32
|
||||
#define __SELF_DEF_ENC32
|
||||
#define DEF_ENC32(...) /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef DEF_PACKED32
|
||||
#define __SELF_DEF_PACKED32
|
||||
#define DEF_PACKED32(...) /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef DEF_ENC_SUBINSN
|
||||
#define __SELF_DEF_ENC_SUBINSN
|
||||
#define DEF_ENC_SUBINSN(...) /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef DEF_EXT_ENC
|
||||
#define __SELF_DEF_EXT_ENC
|
||||
#define DEF_EXT_ENC(...) /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef DEF_EXT_SPACE
|
||||
#define __SELF_DEF_EXT_SPACE
|
||||
#define DEF_EXT_SPACE(...) /* nothing */
|
||||
#endif
|
||||
|
||||
#include "encode_pp.def"
|
||||
#include "encode_subinsn.def"
|
||||
|
||||
#ifdef __SELF_DEF_FIELD32
|
||||
#undef __SELF_DEF_FIELD32
|
||||
#undef DEF_FIELD32
|
||||
#endif
|
||||
|
||||
#ifdef __SELF_DEF_CLASS32
|
||||
#undef __SELF_DEF_CLASS32
|
||||
#undef DEF_CLASS32
|
||||
#endif
|
||||
|
||||
#ifdef __SELF_DEF_ANTICLASS32
|
||||
#undef __SELF_DEF_ANTICLASS32
|
||||
#undef DEF_ANTICLASS32
|
||||
#endif
|
||||
|
||||
#ifdef __SELF_DEF_LEGACY_DEF_ENC32
|
||||
#undef __SELF_DEF_LEGACY_DEF_ENC32
|
||||
#undef LEGACY_DEF_ENC32
|
||||
#endif
|
||||
|
||||
#ifdef __SELF_DEF_FIELDROW_DESC32
|
||||
#undef __SELF_DEF_FIELDROW_DESC32
|
||||
#undef DEF_FIELDROW_DESC32
|
||||
#endif
|
||||
|
||||
#ifdef __SELF_DEF_ENC32
|
||||
#undef __SELF_DEF_ENC32
|
||||
#undef DEF_ENC32
|
||||
#endif
|
||||
|
||||
#ifdef __SELF_DEF_EXT_SPACE
|
||||
#undef __SELF_DEF_EXT_SPACE
|
||||
#undef DEF_EXT_SPACE
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __SELF_DEF_PACKED32
|
||||
#undef __SELF_DEF_PACKED32
|
||||
#undef DEF_PACKED32
|
||||
#endif
|
||||
|
||||
#ifdef __SELF_DEF_ENC_SUBINSN
|
||||
#undef __SELF_DEF_ENC_SUBINSN
|
||||
#undef DEF_ENC_SUBINSN
|
||||
#endif
|
||||
|
||||
#ifdef __SELF_DEF_EXT_ENC
|
||||
#undef __SELF_DEF_EXT_ENC
|
||||
#undef DEF_EXT_ENC
|
||||
#endif
|
2110
target/hexagon/imported/encode_pp.def
Normal file
2110
target/hexagon/imported/encode_pp.def
Normal file
File diff suppressed because it is too large
Load Diff
149
target/hexagon/imported/encode_subinsn.def
Normal file
149
target/hexagon/imported/encode_subinsn.def
Normal file
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
|
||||
/* DEF_ENC_SUBINSN(TAG, CLASS, ENCSTR) */
|
||||
|
||||
|
||||
|
||||
|
||||
/*********************/
|
||||
/* Ld1-type subinsns */
|
||||
/*********************/
|
||||
DEF_ENC_SUBINSN(SL1_loadri_io, SUBINSN_L1, "0iiiissssdddd")
|
||||
DEF_ENC_SUBINSN(SL1_loadrub_io, SUBINSN_L1, "1iiiissssdddd")
|
||||
|
||||
/*********************/
|
||||
/* St1-type subinsns */
|
||||
/*********************/
|
||||
DEF_ENC_SUBINSN(SS1_storew_io, SUBINSN_S1, "0ii iisssstttt")
|
||||
DEF_ENC_SUBINSN(SS1_storeb_io, SUBINSN_S1, "1ii iisssstttt")
|
||||
|
||||
|
||||
/*********************/
|
||||
/* Ld2-type subinsns */
|
||||
/*********************/
|
||||
DEF_ENC_SUBINSN(SL2_loadrh_io, SUBINSN_L2, "00i iissssdddd")
|
||||
DEF_ENC_SUBINSN(SL2_loadruh_io, SUBINSN_L2, "01i iissssdddd")
|
||||
DEF_ENC_SUBINSN(SL2_loadrb_io, SUBINSN_L2, "10i iissssdddd")
|
||||
DEF_ENC_SUBINSN(SL2_loadri_sp, SUBINSN_L2, "111 0iiiiidddd")
|
||||
DEF_ENC_SUBINSN(SL2_loadrd_sp, SUBINSN_L2, "111 10iiiiiddd")
|
||||
|
||||
DEF_ENC_SUBINSN(SL2_deallocframe,SUBINSN_L2, "111 1100---0--")
|
||||
|
||||
DEF_ENC_SUBINSN(SL2_return, SUBINSN_L2, "111 1101---0--")
|
||||
DEF_ENC_SUBINSN(SL2_return_t, SUBINSN_L2, "111 1101---100")
|
||||
DEF_ENC_SUBINSN(SL2_return_f, SUBINSN_L2, "111 1101---101")
|
||||
DEF_ENC_SUBINSN(SL2_return_tnew, SUBINSN_L2, "111 1101---110")
|
||||
DEF_ENC_SUBINSN(SL2_return_fnew, SUBINSN_L2, "111 1101---111")
|
||||
|
||||
DEF_ENC_SUBINSN(SL2_jumpr31, SUBINSN_L2, "111 1111---0--")
|
||||
DEF_ENC_SUBINSN(SL2_jumpr31_t, SUBINSN_L2, "111 1111---100")
|
||||
DEF_ENC_SUBINSN(SL2_jumpr31_f, SUBINSN_L2, "111 1111---101")
|
||||
DEF_ENC_SUBINSN(SL2_jumpr31_tnew,SUBINSN_L2, "111 1111---110")
|
||||
DEF_ENC_SUBINSN(SL2_jumpr31_fnew,SUBINSN_L2, "111 1111---111")
|
||||
|
||||
|
||||
/*********************/
|
||||
/* St2-type subinsns */
|
||||
/*********************/
|
||||
DEF_ENC_SUBINSN(SS2_storeh_io, SUBINSN_S2, "00i iisssstttt")
|
||||
DEF_ENC_SUBINSN(SS2_storew_sp, SUBINSN_S2, "010 0iiiiitttt")
|
||||
DEF_ENC_SUBINSN(SS2_stored_sp, SUBINSN_S2, "010 1iiiiiittt")
|
||||
|
||||
DEF_ENC_SUBINSN(SS2_storewi0, SUBINSN_S2, "100 00ssssiiii")
|
||||
DEF_ENC_SUBINSN(SS2_storewi1, SUBINSN_S2, "100 01ssssiiii")
|
||||
DEF_ENC_SUBINSN(SS2_storebi0, SUBINSN_S2, "100 10ssssiiii")
|
||||
DEF_ENC_SUBINSN(SS2_storebi1, SUBINSN_S2, "100 11ssssiiii")
|
||||
|
||||
DEF_ENC_SUBINSN(SS2_allocframe, SUBINSN_S2, "111 0iiiii----")
|
||||
|
||||
|
||||
|
||||
/*******************/
|
||||
/* A-type subinsns */
|
||||
/*******************/
|
||||
DEF_ENC_SUBINSN(SA1_addi, SUBINSN_A, "00i iiiiiixxxx")
|
||||
DEF_ENC_SUBINSN(SA1_seti, SUBINSN_A, "010 iiiiiidddd")
|
||||
DEF_ENC_SUBINSN(SA1_addsp, SUBINSN_A, "011 iiiiiidddd")
|
||||
|
||||
DEF_ENC_SUBINSN(SA1_tfr, SUBINSN_A, "100 00ssssdddd")
|
||||
DEF_ENC_SUBINSN(SA1_inc, SUBINSN_A, "100 01ssssdddd")
|
||||
DEF_ENC_SUBINSN(SA1_and1, SUBINSN_A, "100 10ssssdddd")
|
||||
DEF_ENC_SUBINSN(SA1_dec, SUBINSN_A, "100 11ssssdddd")
|
||||
|
||||
DEF_ENC_SUBINSN(SA1_sxth, SUBINSN_A, "101 00ssssdddd")
|
||||
DEF_ENC_SUBINSN(SA1_sxtb, SUBINSN_A, "101 01ssssdddd")
|
||||
DEF_ENC_SUBINSN(SA1_zxth, SUBINSN_A, "101 10ssssdddd")
|
||||
DEF_ENC_SUBINSN(SA1_zxtb, SUBINSN_A, "101 11ssssdddd")
|
||||
|
||||
|
||||
DEF_ENC_SUBINSN(SA1_addrx, SUBINSN_A, "110 00ssssxxxx")
|
||||
DEF_ENC_SUBINSN(SA1_cmpeqi, SUBINSN_A, "110 01ssss--ii")
|
||||
DEF_ENC_SUBINSN(SA1_setin1, SUBINSN_A, "110 1--0--dddd")
|
||||
DEF_ENC_SUBINSN(SA1_clrtnew, SUBINSN_A, "110 1--100dddd")
|
||||
DEF_ENC_SUBINSN(SA1_clrfnew, SUBINSN_A, "110 1--101dddd")
|
||||
DEF_ENC_SUBINSN(SA1_clrt, SUBINSN_A, "110 1--110dddd")
|
||||
DEF_ENC_SUBINSN(SA1_clrf, SUBINSN_A, "110 1--111dddd")
|
||||
|
||||
|
||||
DEF_ENC_SUBINSN(SA1_combine0i, SUBINSN_A, "111 -0-ii00ddd")
|
||||
DEF_ENC_SUBINSN(SA1_combine1i, SUBINSN_A, "111 -0-ii01ddd")
|
||||
DEF_ENC_SUBINSN(SA1_combine2i, SUBINSN_A, "111 -0-ii10ddd")
|
||||
DEF_ENC_SUBINSN(SA1_combine3i, SUBINSN_A, "111 -0-ii11ddd")
|
||||
DEF_ENC_SUBINSN(SA1_combinezr, SUBINSN_A, "111 -1ssss0ddd")
|
||||
DEF_ENC_SUBINSN(SA1_combinerz, SUBINSN_A, "111 -1ssss1ddd")
|
||||
|
||||
|
||||
|
||||
|
||||
/* maybe R=cmpeq ? */
|
||||
|
||||
|
||||
/* Add a group of NCJ: if (R.new==#0) jump:hint #r9 */
|
||||
/* Add a group of NCJ: if (R.new!=#0) jump:hint #r9 */
|
||||
/* NCJ goes with LD1, LD2 */
|
||||
|
||||
|
||||
|
||||
|
||||
DEF_FIELD32("---! !!!! !!!!!!!! EE------ --------",SUBFIELD_B_SLOT1,"B: Slot1 Instruction")
|
||||
DEF_FIELD32("---- ---- -------- EE-!!!!! !!!!!!!!",SUBFIELD_A_SLOT0,"A: Slot0 Instruction")
|
||||
|
||||
|
||||
/* DEF_PACKED32(TAG, CLASSA, CLASSB, ENCSTR) */
|
||||
|
||||
DEF_PACKED32(P2_PACKED_L1_L1, SUBINSN_L1, SUBINSN_L1, "000B BBBB BBBB BBBB EE0A AAAA AAAA AAAA")
|
||||
DEF_PACKED32(P2_PACKED_L1_L2, SUBINSN_L2, SUBINSN_L1, "000B BBBB BBBB BBBB EE1A AAAA AAAA AAAA")
|
||||
DEF_PACKED32(P2_PACKED_L2_L2, SUBINSN_L2, SUBINSN_L2, "001B BBBB BBBB BBBB EE0A AAAA AAAA AAAA")
|
||||
DEF_PACKED32(P2_PACKED_A_A, SUBINSN_A, SUBINSN_A, "001B BBBB BBBB BBBB EE1A AAAA AAAA AAAA")
|
||||
|
||||
DEF_PACKED32(P2_PACKED_L1_A, SUBINSN_L1, SUBINSN_A, "010B BBBB BBBB BBBB EE0A AAAA AAAA AAAA")
|
||||
DEF_PACKED32(P2_PACKED_L2_A, SUBINSN_L2, SUBINSN_A, "010B BBBB BBBB BBBB EE1A AAAA AAAA AAAA")
|
||||
DEF_PACKED32(P2_PACKED_S1_A, SUBINSN_S1, SUBINSN_A, "011B BBBB BBBB BBBB EE0A AAAA AAAA AAAA")
|
||||
DEF_PACKED32(P2_PACKED_S2_A, SUBINSN_S2, SUBINSN_A, "011B BBBB BBBB BBBB EE1A AAAA AAAA AAAA")
|
||||
|
||||
DEF_PACKED32(P2_PACKED_S1_L1, SUBINSN_S1, SUBINSN_L1, "100B BBBB BBBB BBBB EE0A AAAA AAAA AAAA")
|
||||
DEF_PACKED32(P2_PACKED_S1_L2, SUBINSN_S1, SUBINSN_L2, "100B BBBB BBBB BBBB EE1A AAAA AAAA AAAA")
|
||||
DEF_PACKED32(P2_PACKED_S1_S1, SUBINSN_S1, SUBINSN_S1, "101B BBBB BBBB BBBB EE0A AAAA AAAA AAAA")
|
||||
DEF_PACKED32(P2_PACKED_S1_S2, SUBINSN_S2, SUBINSN_S1, "101B BBBB BBBB BBBB EE1A AAAA AAAA AAAA")
|
||||
|
||||
DEF_PACKED32(P2_PACKED_S2_L1, SUBINSN_S2, SUBINSN_L1, "110B BBBB BBBB BBBB EE0A AAAA AAAA AAAA")
|
||||
DEF_PACKED32(P2_PACKED_S2_L2, SUBINSN_S2, SUBINSN_L2, "110B BBBB BBBB BBBB EE1A AAAA AAAA AAAA")
|
||||
DEF_PACKED32(P2_PACKED_S2_S2, SUBINSN_S2, SUBINSN_S2, "111B BBBB BBBB BBBB EE0A AAAA AAAA AAAA")
|
||||
|
||||
DEF_PACKED32(P2_PACKED_RESERVED, SUBINSN_INVALID, SUBINSN_INVALID, "111B BBBB BBBB BBBB EE1A AAAA AAAA AAAA")
|
312
target/hexagon/imported/float.idef
Normal file
312
target/hexagon/imported/float.idef
Normal file
@ -0,0 +1,312 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Floating-Point Instructions
|
||||
*/
|
||||
|
||||
/*************************************/
|
||||
/* Scalar FP */
|
||||
/*************************************/
|
||||
Q6INSN(F2_sfadd,"Rd32=sfadd(Rs32,Rt32)",ATTRIBS(),
|
||||
"Floating-Point Add",
|
||||
{ RdV=fUNFLOAT(fFLOAT(RsV)+fFLOAT(RtV));})
|
||||
|
||||
Q6INSN(F2_sfsub,"Rd32=sfsub(Rs32,Rt32)",ATTRIBS(),
|
||||
"Floating-Point Subtract",
|
||||
{ RdV=fUNFLOAT(fFLOAT(RsV)-fFLOAT(RtV));})
|
||||
|
||||
Q6INSN(F2_sfmpy,"Rd32=sfmpy(Rs32,Rt32)",ATTRIBS(),
|
||||
"Floating-Point Multiply",
|
||||
{ RdV=fUNFLOAT(fSFMPY(fFLOAT(RsV),fFLOAT(RtV)));})
|
||||
|
||||
Q6INSN(F2_sffma,"Rx32+=sfmpy(Rs32,Rt32)",ATTRIBS(),
|
||||
"Floating-Point Fused Multiply Add",
|
||||
{ RxV=fUNFLOAT(fFMAF(fFLOAT(RsV),fFLOAT(RtV),fFLOAT(RxV)));})
|
||||
|
||||
Q6INSN(F2_sffma_sc,"Rx32+=sfmpy(Rs32,Rt32,Pu4):scale",ATTRIBS(),
|
||||
"Floating-Point Fused Multiply Add w/ Additional Scaling (2**Pu)",
|
||||
{
|
||||
fHIDE(size4s_t tmp;)
|
||||
fCHECKSFNAN3(RxV,RxV,RsV,RtV);
|
||||
tmp=fUNFLOAT(fFMAFX(fFLOAT(RsV),fFLOAT(RtV),fFLOAT(RxV),PuV));
|
||||
if (!((fFLOAT(RxV) == 0.0) && fISZEROPROD(fFLOAT(RsV),fFLOAT(RtV)))) RxV = tmp;
|
||||
})
|
||||
|
||||
Q6INSN(F2_sffms,"Rx32-=sfmpy(Rs32,Rt32)",ATTRIBS(),
|
||||
"Floating-Point Fused Multiply Add",
|
||||
{ RxV=fUNFLOAT(fFMAF(-fFLOAT(RsV),fFLOAT(RtV),fFLOAT(RxV))); })
|
||||
|
||||
Q6INSN(F2_sffma_lib,"Rx32+=sfmpy(Rs32,Rt32):lib",ATTRIBS(),
|
||||
"Floating-Point Fused Multiply Add for Library Routines",
|
||||
{ fFPSETROUND_NEAREST(); fHIDE(int infinp; int infminusinf; size4s_t tmp;)
|
||||
infminusinf = ((isinf(fFLOAT(RxV))) &&
|
||||
(fISINFPROD(fFLOAT(RsV),fFLOAT(RtV))) &&
|
||||
(fGETBIT(31,RsV ^ RxV ^ RtV) != 0));
|
||||
infinp = (isinf(fFLOAT(RxV))) || (isinf(fFLOAT(RtV))) || (isinf(fFLOAT(RsV)));
|
||||
fCHECKSFNAN3(RxV,RxV,RsV,RtV);
|
||||
tmp=fUNFLOAT(fFMAF(fFLOAT(RsV),fFLOAT(RtV),fFLOAT(RxV)));
|
||||
if (!((fFLOAT(RxV) == 0.0) && fISZEROPROD(fFLOAT(RsV),fFLOAT(RtV)))) RxV = tmp;
|
||||
fFPCANCELFLAGS();
|
||||
if (isinf(fFLOAT(RxV)) && !infinp) RxV = RxV - 1;
|
||||
if (infminusinf) RxV = 0;
|
||||
})
|
||||
|
||||
Q6INSN(F2_sffms_lib,"Rx32-=sfmpy(Rs32,Rt32):lib",ATTRIBS(),
|
||||
"Floating-Point Fused Multiply Add for Library Routines",
|
||||
{ fFPSETROUND_NEAREST(); fHIDE(int infinp; int infminusinf; size4s_t tmp;)
|
||||
infminusinf = ((isinf(fFLOAT(RxV))) &&
|
||||
(fISINFPROD(fFLOAT(RsV),fFLOAT(RtV))) &&
|
||||
(fGETBIT(31,RsV ^ RxV ^ RtV) == 0));
|
||||
infinp = (isinf(fFLOAT(RxV))) || (isinf(fFLOAT(RtV))) || (isinf(fFLOAT(RsV)));
|
||||
fCHECKSFNAN3(RxV,RxV,RsV,RtV);
|
||||
tmp=fUNFLOAT(fFMAF(-fFLOAT(RsV),fFLOAT(RtV),fFLOAT(RxV)));
|
||||
if (!((fFLOAT(RxV) == 0.0) && fISZEROPROD(fFLOAT(RsV),fFLOAT(RtV)))) RxV = tmp;
|
||||
fFPCANCELFLAGS();
|
||||
if (isinf(fFLOAT(RxV)) && !infinp) RxV = RxV - 1;
|
||||
if (infminusinf) RxV = 0;
|
||||
})
|
||||
|
||||
|
||||
Q6INSN(F2_sfcmpeq,"Pd4=sfcmp.eq(Rs32,Rt32)",ATTRIBS(),
|
||||
"Floating Point Compare for Equal",
|
||||
{PdV=f8BITSOF(fFLOAT(RsV)==fFLOAT(RtV));})
|
||||
|
||||
Q6INSN(F2_sfcmpgt,"Pd4=sfcmp.gt(Rs32,Rt32)",ATTRIBS(),
|
||||
"Floating-Point Compare for Greater Than",
|
||||
{PdV=f8BITSOF(fFLOAT(RsV)>fFLOAT(RtV));})
|
||||
|
||||
/* cmpge is not the same as !cmpgt(swapops) in IEEE */
|
||||
|
||||
Q6INSN(F2_sfcmpge,"Pd4=sfcmp.ge(Rs32,Rt32)",ATTRIBS(),
|
||||
"Floating-Point Compare for Greater Than / Equal To",
|
||||
{PdV=f8BITSOF(fFLOAT(RsV)>=fFLOAT(RtV));})
|
||||
|
||||
/* Everyone seems to have this... */
|
||||
|
||||
Q6INSN(F2_sfcmpuo,"Pd4=sfcmp.uo(Rs32,Rt32)",ATTRIBS(),
|
||||
"Floating-Point Compare for Unordered",
|
||||
{PdV=f8BITSOF(isunordered(fFLOAT(RsV),fFLOAT(RtV)));})
|
||||
|
||||
|
||||
Q6INSN(F2_sfmax,"Rd32=sfmax(Rs32,Rt32)",ATTRIBS(),
|
||||
"Maximum of Floating-Point values",
|
||||
{ RdV = fUNFLOAT(fSF_MAX(fFLOAT(RsV),fFLOAT(RtV))); })
|
||||
|
||||
Q6INSN(F2_sfmin,"Rd32=sfmin(Rs32,Rt32)",ATTRIBS(),
|
||||
"Minimum of Floating-Point values",
|
||||
{ RdV = fUNFLOAT(fSF_MIN(fFLOAT(RsV),fFLOAT(RtV))); })
|
||||
|
||||
|
||||
Q6INSN(F2_sfclass,"Pd4=sfclass(Rs32,#u5)",ATTRIBS(),
|
||||
"Classify Floating-Point Value",
|
||||
{
|
||||
fHIDE(int class;)
|
||||
PdV = 0;
|
||||
class = fpclassify(fFLOAT(RsV));
|
||||
/* Is the value zero? */
|
||||
if (fGETBIT(0,uiV) && (class == FP_ZERO)) PdV = 0xff;
|
||||
if (fGETBIT(1,uiV) && (class == FP_NORMAL)) PdV = 0xff;
|
||||
if (fGETBIT(2,uiV) && (class == FP_SUBNORMAL)) PdV = 0xff;
|
||||
if (fGETBIT(3,uiV) && (class == FP_INFINITE)) PdV = 0xff;
|
||||
if (fGETBIT(4,uiV) && (class == FP_NAN)) PdV = 0xff;
|
||||
fFPCANCELFLAGS();
|
||||
})
|
||||
|
||||
/* Range: +/- (1.0 .. 1+(63/64)) * 2**(-6 .. +9) */
|
||||
/* More immediate bits should probably be used for more precision? */
|
||||
|
||||
Q6INSN(F2_sfimm_p,"Rd32=sfmake(#u10):pos",ATTRIBS(),
|
||||
"Make Floating Point Value",
|
||||
{
|
||||
RdV = (127 - 6) << 23;
|
||||
RdV += uiV << 17;
|
||||
})
|
||||
|
||||
Q6INSN(F2_sfimm_n,"Rd32=sfmake(#u10):neg",ATTRIBS(),
|
||||
"Make Floating Point Value",
|
||||
{
|
||||
RdV = (127 - 6) << 23;
|
||||
RdV += (uiV << 17);
|
||||
RdV |= (1 << 31);
|
||||
})
|
||||
|
||||
|
||||
Q6INSN(F2_sffixupn,"Rd32=sffixupn(Rs32,Rt32)",ATTRIBS(),
|
||||
"Fix Up Numerator",
|
||||
{
|
||||
fHIDE(int adjust;)
|
||||
fSF_RECIP_COMMON(RsV,RtV,RdV,adjust);
|
||||
RdV = RsV;
|
||||
})
|
||||
|
||||
Q6INSN(F2_sffixupd,"Rd32=sffixupd(Rs32,Rt32)",ATTRIBS(),
|
||||
"Fix Up Denominator",
|
||||
{
|
||||
fHIDE(int adjust;)
|
||||
fSF_RECIP_COMMON(RsV,RtV,RdV,adjust);
|
||||
RdV = RtV;
|
||||
})
|
||||
|
||||
Q6INSN(F2_sffixupr,"Rd32=sffixupr(Rs32)",ATTRIBS(),
|
||||
"Fix Up Radicand",
|
||||
{
|
||||
fHIDE(int adjust;)
|
||||
fSF_INVSQRT_COMMON(RsV,RdV,adjust);
|
||||
RdV = RsV;
|
||||
})
|
||||
|
||||
/*************************************/
|
||||
/* Scalar DP */
|
||||
/*************************************/
|
||||
Q6INSN(F2_dfadd,"Rdd32=dfadd(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Floating-Point Add",
|
||||
{ RddV=fUNDOUBLE(fDOUBLE(RssV)+fDOUBLE(RttV));})
|
||||
|
||||
Q6INSN(F2_dfsub,"Rdd32=dfsub(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Floating-Point Subtract",
|
||||
{ RddV=fUNDOUBLE(fDOUBLE(RssV)-fDOUBLE(RttV));})
|
||||
|
||||
Q6INSN(F2_dfmax,"Rdd32=dfmax(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Maximum of Floating-Point values",
|
||||
{ RddV = fUNDOUBLE(fDF_MAX(fDOUBLE(RssV),fDOUBLE(RttV))); })
|
||||
|
||||
Q6INSN(F2_dfmin,"Rdd32=dfmin(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Minimum of Floating-Point values",
|
||||
{ RddV = fUNDOUBLE(fDF_MIN(fDOUBLE(RssV),fDOUBLE(RttV))); })
|
||||
|
||||
Q6INSN(F2_dfmpyfix,"Rdd32=dfmpyfix(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Fix Up Multiplicand for Multiplication",
|
||||
{
|
||||
if (fDF_ISDENORM(RssV) && fDF_ISBIG(RttV) && fDF_ISNORMAL(RttV)) RddV = fUNDOUBLE(fDOUBLE(RssV) * 0x1.0p52);
|
||||
else if (fDF_ISDENORM(RttV) && fDF_ISBIG(RssV) && fDF_ISNORMAL(RssV)) RddV = fUNDOUBLE(fDOUBLE(RssV) * 0x1.0p-52);
|
||||
else RddV = RssV;
|
||||
})
|
||||
|
||||
Q6INSN(F2_dfmpyll,"Rdd32=dfmpyll(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Multiply low*low and shift off low 32 bits into sticky (in MSB)",
|
||||
{
|
||||
fHIDE(size8u_t prod;)
|
||||
prod = fMPY32UU(fGETUWORD(0,RssV),fGETUWORD(0,RttV));
|
||||
RddV = (prod >> 32) << 1;
|
||||
if (fGETUWORD(0,prod) != 0) fSETBIT(0,RddV,1);
|
||||
})
|
||||
|
||||
Q6INSN(F2_dfmpylh,"Rxx32+=dfmpylh(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Multiply low*high and accumulate",
|
||||
{
|
||||
RxxV += (fGETUWORD(0,RssV) * (0x00100000 | fZXTN(20,64,fGETUWORD(1,RttV)))) << 1;
|
||||
})
|
||||
|
||||
Q6INSN(F2_dfmpyhh,"Rxx32+=dfmpyhh(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Multiply high*high and accumulate with L*H value",
|
||||
{
|
||||
RxxV = fUNDOUBLE(fDF_MPY_HH(fDOUBLE(RssV),fDOUBLE(RttV),RxxV));
|
||||
})
|
||||
|
||||
|
||||
|
||||
Q6INSN(F2_dfcmpeq,"Pd4=dfcmp.eq(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Floating Point Compare for Equal",
|
||||
{PdV=f8BITSOF(fDOUBLE(RssV)==fDOUBLE(RttV));})
|
||||
|
||||
Q6INSN(F2_dfcmpgt,"Pd4=dfcmp.gt(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Floating-Point Compare for Greater Than",
|
||||
{PdV=f8BITSOF(fDOUBLE(RssV)>fDOUBLE(RttV));})
|
||||
|
||||
|
||||
/* cmpge is not the same as !cmpgt(swapops) in IEEE */
|
||||
|
||||
Q6INSN(F2_dfcmpge,"Pd4=dfcmp.ge(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Floating-Point Compare for Greater Than / Equal To",
|
||||
{PdV=f8BITSOF(fDOUBLE(RssV)>=fDOUBLE(RttV));})
|
||||
|
||||
/* Everyone seems to have this... */
|
||||
|
||||
Q6INSN(F2_dfcmpuo,"Pd4=dfcmp.uo(Rss32,Rtt32)",ATTRIBS(),
|
||||
"Floating-Point Compare for Unordered",
|
||||
{PdV=f8BITSOF(isunordered(fDOUBLE(RssV),fDOUBLE(RttV)));})
|
||||
|
||||
|
||||
Q6INSN(F2_dfclass,"Pd4=dfclass(Rss32,#u5)",ATTRIBS(),
|
||||
"Classify Floating-Point Value",
|
||||
{
|
||||
fHIDE(int class;)
|
||||
PdV = 0;
|
||||
class = fpclassify(fDOUBLE(RssV));
|
||||
/* Is the value zero? */
|
||||
if (fGETBIT(0,uiV) && (class == FP_ZERO)) PdV = 0xff;
|
||||
if (fGETBIT(1,uiV) && (class == FP_NORMAL)) PdV = 0xff;
|
||||
if (fGETBIT(2,uiV) && (class == FP_SUBNORMAL)) PdV = 0xff;
|
||||
if (fGETBIT(3,uiV) && (class == FP_INFINITE)) PdV = 0xff;
|
||||
if (fGETBIT(4,uiV) && (class == FP_NAN)) PdV = 0xff;
|
||||
fFPCANCELFLAGS();
|
||||
})
|
||||
|
||||
|
||||
/* Range: +/- (1.0 .. 1+(63/64)) * 2**(-6 .. +9) */
|
||||
/* More immediate bits should probably be used for more precision? */
|
||||
|
||||
Q6INSN(F2_dfimm_p,"Rdd32=dfmake(#u10):pos",ATTRIBS(),
|
||||
"Make Floating Point Value",
|
||||
{
|
||||
RddV = (1023ULL - 6) << 52;
|
||||
RddV += (fHIDE((size8u_t))uiV) << 46;
|
||||
})
|
||||
|
||||
Q6INSN(F2_dfimm_n,"Rdd32=dfmake(#u10):neg",ATTRIBS(),
|
||||
"Make Floating Point Value",
|
||||
{
|
||||
RddV = (1023ULL - 6) << 52;
|
||||
RddV += (fHIDE((size8u_t))uiV) << 46;
|
||||
RddV |= ((1ULL) << 63);
|
||||
})
|
||||
|
||||
|
||||
/* CONVERSION */
|
||||
|
||||
#define CONVERT(TAG,DEST,DESTV,SRC,SRCV,OUTCAST,OUTTYPE,INCAST,INTYPE,MODETAG,MODESYN,MODEBEH) \
|
||||
Q6INSN(F2_conv_##TAG##MODETAG,#DEST"=convert_"#TAG"("#SRC")"#MODESYN,ATTRIBS(), \
|
||||
"Floating point format conversion", \
|
||||
{ MODEBEH DESTV = OUTCAST(conv_##INTYPE##_to_##OUTTYPE(INCAST(SRCV))); })
|
||||
|
||||
CONVERT(sf2df,Rdd32,RddV,Rs32,RsV,fUNDOUBLE,df,fFLOAT,sf,,,)
|
||||
CONVERT(df2sf,Rd32,RdV,Rss32,RssV,fUNFLOAT,sf,fDOUBLE,df,,,)
|
||||
|
||||
#define ALLINTDST(TAGSTART,SRC,SRCV,INCAST,INTYPE,MODETAG,MODESYN,MODEBEH) \
|
||||
CONVERT(TAGSTART##uw,Rd32,RdV,SRC,SRCV,fCAST4u,4u,INCAST,INTYPE,MODETAG,MODESYN,MODEBEH) \
|
||||
CONVERT(TAGSTART##w,Rd32,RdV,SRC,SRCV,fCAST4s,4s,INCAST,INTYPE,MODETAG,MODESYN,MODEBEH) \
|
||||
CONVERT(TAGSTART##ud,Rdd32,RddV,SRC,SRCV,fCAST8u,8u,INCAST,INTYPE,MODETAG,MODESYN,MODEBEH) \
|
||||
CONVERT(TAGSTART##d,Rdd32,RddV,SRC,SRCV,fCAST8s,8s,INCAST,INTYPE,MODETAG,MODESYN,MODEBEH)
|
||||
|
||||
#define ALLFPDST(TAGSTART,SRC,SRCV,INCAST,INTYPE,MODETAG,MODESYN,MODEBEH) \
|
||||
CONVERT(TAGSTART##sf,Rd32,RdV,SRC,SRCV,fUNFLOAT,sf,INCAST,INTYPE,MODETAG,MODESYN,MODEBEH) \
|
||||
CONVERT(TAGSTART##df,Rdd32,RddV,SRC,SRCV,fUNDOUBLE,df,INCAST,INTYPE,MODETAG,MODESYN,MODEBEH)
|
||||
|
||||
#define ALLINTSRC(GEN,MODETAG,MODESYN,MODEBEH) \
|
||||
GEN(uw##2,Rs32,RsV,fCAST4u,4u,MODETAG,MODESYN,MODEBEH) \
|
||||
GEN(w##2,Rs32,RsV,fCAST4s,4s,MODETAG,MODESYN,MODEBEH) \
|
||||
GEN(ud##2,Rss32,RssV,fCAST8u,8u,MODETAG,MODESYN,MODEBEH) \
|
||||
GEN(d##2,Rss32,RssV,fCAST8s,8s,MODETAG,MODESYN,MODEBEH)
|
||||
|
||||
#define ALLFPSRC(GEN,MODETAG,MODESYN,MODEBEH) \
|
||||
GEN(sf##2,Rs32,RsV,fFLOAT,sf,MODETAG,MODESYN,MODEBEH) \
|
||||
GEN(df##2,Rss32,RssV,fDOUBLE,df,MODETAG,MODESYN,MODEBEH)
|
||||
|
||||
ALLINTSRC(ALLFPDST,,,)
|
||||
ALLFPSRC(ALLINTDST,,,)
|
||||
ALLFPSRC(ALLINTDST,_chop,:chop,fFPSETROUND_CHOP();)
|
286
target/hexagon/imported/ldst.idef
Normal file
286
target/hexagon/imported/ldst.idef
Normal file
@ -0,0 +1,286 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Load and Store instruction definitions
|
||||
*/
|
||||
|
||||
/* The set of addressing modes standard to all Load instructions */
|
||||
#define STD_LD_AMODES(TAG,OPER,DESCR,ATTRIB,SHFT,SEMANTICS,SCALE)\
|
||||
Q6INSN(L2_##TAG##_io, OPER"(Rs32+#s11:"SHFT")", ATTRIB,DESCR,{fIMMEXT(siV); fEA_RI(RsV,siV); SEMANTICS; })\
|
||||
Q6INSN(L4_##TAG##_ur, OPER"(Rt32<<#u2+#U6)", ATTRIB,DESCR,{fMUST_IMMEXT(UiV); fEA_IRs(UiV,RtV,uiV); SEMANTICS;})\
|
||||
Q6INSN(L4_##TAG##_ap, OPER"(Re32=#U6)", ATTRIB,DESCR,{fMUST_IMMEXT(UiV); fEA_IMM(UiV); SEMANTICS; ReV=UiV; })\
|
||||
Q6INSN(L2_##TAG##_pr, OPER"(Rx32++Mu2)", ATTRIB,DESCR,{fEA_REG(RxV); fPM_M(RxV,MuV); SEMANTICS;})\
|
||||
Q6INSN(L2_##TAG##_pi, OPER"(Rx32++#s4:"SHFT")", ATTRIB,DESCR,{fEA_REG(RxV); fPM_I(RxV,siV); SEMANTICS;})\
|
||||
|
||||
/* The set of 32-bit load instructions */
|
||||
STD_LD_AMODES(loadrub,"Rd32=memub","Load Unsigned Byte",ATTRIBS(A_LOAD),"0",fLOAD(1,1,u,EA,RdV),0)
|
||||
STD_LD_AMODES(loadrb, "Rd32=memb", "Load signed Byte",ATTRIBS(A_LOAD),"0",fLOAD(1,1,s,EA,RdV),0)
|
||||
STD_LD_AMODES(loadruh,"Rd32=memuh","Load unsigned Half integer",ATTRIBS(A_LOAD),"1",fLOAD(1,2,u,EA,RdV),1)
|
||||
STD_LD_AMODES(loadrh, "Rd32=memh", "Load signed Half integer",ATTRIBS(A_LOAD),"1",fLOAD(1,2,s,EA,RdV),1)
|
||||
STD_LD_AMODES(loadri, "Rd32=memw", "Load Word",ATTRIBS(A_LOAD),"2",fLOAD(1,4,u,EA,RdV),2)
|
||||
STD_LD_AMODES(loadrd, "Rdd32=memd","Load Double integer",ATTRIBS(A_LOAD),"3",fLOAD(1,8,u,EA,RddV),3)
|
||||
|
||||
/* The set of addressing modes standard to all Store instructions */
|
||||
#define STD_ST_AMODES(TAG,DEST,OPER,DESCR,ATTRIB,SHFT,SEMANTICS,SCALE)\
|
||||
Q6INSN(S2_##TAG##_io, OPER"(Rs32+#s11:"SHFT")="DEST, ATTRIB,DESCR,{fIMMEXT(siV); fEA_RI(RsV,siV); SEMANTICS; })\
|
||||
Q6INSN(S2_##TAG##_pi, OPER"(Rx32++#s4:"SHFT")="DEST, ATTRIB,DESCR,{fEA_REG(RxV); fPM_I(RxV,siV); SEMANTICS; })\
|
||||
Q6INSN(S4_##TAG##_ap, OPER"(Re32=#U6)="DEST, ATTRIB,DESCR,{fMUST_IMMEXT(UiV); fEA_IMM(UiV); SEMANTICS; ReV=UiV; })\
|
||||
Q6INSN(S2_##TAG##_pr, OPER"(Rx32++Mu2)="DEST, ATTRIB,DESCR,{fEA_REG(RxV); fPM_M(RxV,MuV); SEMANTICS; })\
|
||||
Q6INSN(S4_##TAG##_ur, OPER"(Ru32<<#u2+#U6)="DEST, ATTRIB,DESCR,{fMUST_IMMEXT(UiV); fEA_IRs(UiV,RuV,uiV); SEMANTICS;})\
|
||||
|
||||
|
||||
/* The set of 32-bit store instructions */
|
||||
STD_ST_AMODES(storerb, "Rt32", "memb","Store Byte",ATTRIBS(A_STORE),"0",fSTORE(1,1,EA,fGETBYTE(0,RtV)),0)
|
||||
STD_ST_AMODES(storerh, "Rt32", "memh","Store Half integer",ATTRIBS(A_STORE),"1",fSTORE(1,2,EA,fGETHALF(0,RtV)),1)
|
||||
STD_ST_AMODES(storerf, "Rt.H32", "memh","Store Upper Half integer",ATTRIBS(A_STORE),"1",fSTORE(1,2,EA,fGETHALF(1,RtV)),1)
|
||||
STD_ST_AMODES(storeri, "Rt32", "memw","Store Word",ATTRIBS(A_STORE),"2",fSTORE(1,4,EA,RtV),2)
|
||||
STD_ST_AMODES(storerd, "Rtt32","memd","Store Double integer",ATTRIBS(A_STORE),"3",fSTORE(1,8,EA,RttV),3)
|
||||
STD_ST_AMODES(storerinew, "Nt8.new", "memw","Store Word",ATTRIBS(A_STORE),"2",fSTORE(1,4,EA,fNEWREG_ST(NtN)),2)
|
||||
STD_ST_AMODES(storerbnew, "Nt8.new", "memb","Store Byte",ATTRIBS(A_STORE),"0",fSTORE(1,1,EA,fGETBYTE(0,fNEWREG_ST(NtN))),0)
|
||||
STD_ST_AMODES(storerhnew, "Nt8.new", "memh","Store Half integer",ATTRIBS(A_STORE),"1",fSTORE(1,2,EA,fGETHALF(0,fNEWREG_ST(NtN))),1)
|
||||
|
||||
|
||||
Q6INSN(S2_allocframe,"allocframe(Rx32,#u11:3):raw", ATTRIBS(A_STORE,A_RESTRICT_SLOT0ONLY), "Allocate stack frame",
|
||||
{ fEA_RI(RxV,-8); fSTORE(1,8,EA,fFRAME_SCRAMBLE((fCAST8_8u(fREAD_LR()) << 32) | fCAST4_4u(fREAD_FP()))); fWRITE_FP(EA); fFRAMECHECK(EA-uiV,EA); RxV = EA-uiV; })
|
||||
|
||||
#define A_RETURN A_RESTRICT_SLOT0ONLY
|
||||
|
||||
Q6INSN(L2_deallocframe,"Rdd32=deallocframe(Rs32):raw", ATTRIBS(A_LOAD), "Deallocate stack frame",
|
||||
{ fHIDE(size8u_t tmp;) fEA_REG(RsV);
|
||||
fLOAD(1,8,u,EA,tmp);
|
||||
RddV = fFRAME_UNSCRAMBLE(tmp);
|
||||
fWRITE_SP(EA+8); })
|
||||
|
||||
Q6INSN(L4_return,"Rdd32=dealloc_return(Rs32):raw", ATTRIBS(A_JINDIR,A_LOAD,A_RETURN), "Deallocate stack frame and return",
|
||||
{ fHIDE(size8u_t tmp;) fEA_REG(RsV);
|
||||
fLOAD(1,8,u,EA,tmp);
|
||||
RddV = fFRAME_UNSCRAMBLE(tmp);
|
||||
fWRITE_SP(EA+8);
|
||||
fJUMPR(REG_LR,fGETWORD(1,RddV),COF_TYPE_JUMPR);})
|
||||
|
||||
#define CONDSEM(SRCREG,STALLBITS0,STALLBITS1,PREDFUNC,PREDARG,STALLSPEC,PREDCOND) \
|
||||
{ \
|
||||
fHIDE(size8u_t tmp;) \
|
||||
fBRANCH_SPECULATE_STALL(PREDFUNC##PREDCOND(PREDARG),,STALLSPEC,STALLBITS0,STALLBITS1); \
|
||||
fEA_REG(SRCREG); \
|
||||
if (PREDFUNC##PREDCOND(PREDARG)) { \
|
||||
fLOAD(1,8,u,EA,tmp); \
|
||||
RddV = fFRAME_UNSCRAMBLE(tmp); \
|
||||
fWRITE_SP(EA+8); \
|
||||
fJUMPR(REG_LR,fGETWORD(1,RddV),COF_TYPE_JUMPR); \
|
||||
} else { \
|
||||
LOAD_CANCEL(EA); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define COND_RETURN_TF(TG,TG2,DOTNEW,STALLBITS0,STALLBITS1,STALLSPEC,ATTRIBS,PREDFUNC,PREDARG,T_NT) \
|
||||
Q6INSN(TG##_t##TG2,"if (Pv4"DOTNEW") Rdd32=dealloc_return(Rs32)"T_NT":raw",ATTRIBS,"deallocate stack frame and return", \
|
||||
CONDSEM(RsV,STALLBITS0,STALLBITS1,PREDFUNC,PREDARG,STALLSPEC,)) \
|
||||
Q6INSN(TG##_f##TG2,"if (!Pv4"DOTNEW") Rdd32=dealloc_return(Rs32)"T_NT":raw",ATTRIBS,"deallocate stack frame and return", \
|
||||
CONDSEM(RsV,STALLBITS0,STALLBITS1,PREDFUNC##NOT,PREDARG,STALLSPEC,))
|
||||
|
||||
#define COND_RETURN_NEW(TG,STALLBITS0,STALLBITS1,ATTRIBS) \
|
||||
COND_RETURN_TF(TG,new_pt,".new",12,0,SPECULATE_TAKEN,ATTRIBS,fLSBNEW,PvN,":t") \
|
||||
COND_RETURN_TF(TG,new_pnt,".new",12,0,SPECULATE_NOT_TAKEN,ATTRIBS,fLSBNEW,PvN,":nt") \
|
||||
|
||||
#define RETURN_ATTRIBS A_LOAD,A_RETURN
|
||||
|
||||
COND_RETURN_TF(L4_return,,,7,0,SPECULATE_NOT_TAKEN,ATTRIBS(RETURN_ATTRIBS,A_JINDIROLD),fLSBOLD,PvV,)
|
||||
COND_RETURN_NEW(L4_return,12,0,ATTRIBS(RETURN_ATTRIBS,A_JINDIRNEW))
|
||||
|
||||
|
||||
|
||||
|
||||
Q6INSN(L2_loadw_locked,"Rd32=memw_locked(Rs32)", ATTRIBS(A_LOAD,A_RESTRICT_SLOT0ONLY), "Load word with lock",
|
||||
{ fEA_REG(RsV); fLOAD_LOCKED(1,4,u,EA,RdV) })
|
||||
|
||||
|
||||
Q6INSN(S2_storew_locked,"memw_locked(Rs32,Pd4)=Rt32", ATTRIBS(A_STORE,A_RESTRICT_SLOT0ONLY), "Store word with lock",
|
||||
{ fEA_REG(RsV); fSTORE_LOCKED(1,4,EA,RtV,PdV) })
|
||||
|
||||
|
||||
Q6INSN(L4_loadd_locked,"Rdd32=memd_locked(Rs32)", ATTRIBS(A_LOAD,A_RESTRICT_SLOT0ONLY), "Load double with lock",
|
||||
{ fEA_REG(RsV); fLOAD_LOCKED(1,8,u,EA,RddV) })
|
||||
|
||||
Q6INSN(S4_stored_locked,"memd_locked(Rs32,Pd4)=Rtt32", ATTRIBS(A_STORE,A_RESTRICT_SLOT0ONLY), "Store word with lock",
|
||||
{ fEA_REG(RsV); fSTORE_LOCKED(1,8,EA,RttV,PdV) })
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/* */
|
||||
/* Predicated LDST */
|
||||
/* */
|
||||
/*****************************************************************/
|
||||
|
||||
#define STD_PLD_AMODES(TAG,OPER,DESCR,ATTRIB,SHFT,SHFTNUM,SEMANTICS)\
|
||||
Q6INSN(L4_##TAG##_rr, OPER"(Rs32+Rt32<<#u2)", ATTRIB,DESCR,{fEA_RRs(RsV,RtV,uiV); SEMANTICS;})\
|
||||
Q6INSN(L2_p##TAG##t_io, "if (Pt4) "OPER"(Rs32+#u6:"SHFT")", ATTRIB,DESCR,{fIMMEXT(uiV); fEA_RI(RsV,uiV); if(fLSBOLD(PtV)){SEMANTICS;} else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L2_p##TAG##t_pi, "if (Pt4) "OPER"(Rx32++#s4:"SHFT")", ATTRIB,DESCR,{fEA_REG(RxV); if(fLSBOLD(PtV)){ fPM_I(RxV,siV); SEMANTICS;} else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L2_p##TAG##f_io, "if (!Pt4) "OPER"(Rs32+#u6:"SHFT")", ATTRIB,DESCR,{fIMMEXT(uiV); fEA_RI(RsV,uiV); if(fLSBOLDNOT(PtV)){ SEMANTICS; } else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L2_p##TAG##f_pi, "if (!Pt4) "OPER"(Rx32++#s4:"SHFT")", ATTRIB,DESCR,{fEA_REG(RxV); if(fLSBOLDNOT(PtV)){ fPM_I(RxV,siV); SEMANTICS;} else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L2_p##TAG##tnew_io,"if (Pt4.new) "OPER"(Rs32+#u6:"SHFT")",ATTRIB,DESCR,{fIMMEXT(uiV); fEA_RI(RsV,uiV); if (fLSBNEW(PtN)) { SEMANTICS; } else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L2_p##TAG##fnew_io,"if (!Pt4.new) "OPER"(Rs32+#u6:"SHFT")",ATTRIB,DESCR,{fIMMEXT(uiV); fEA_RI(RsV,uiV); if (fLSBNEWNOT(PtN)) { SEMANTICS; } else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L4_p##TAG##t_rr, "if (Pv4) "OPER"(Rs32+Rt32<<#u2)", ATTRIB,DESCR,{fEA_RRs(RsV,RtV,uiV); if(fLSBOLD(PvV)){ SEMANTICS;} else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L4_p##TAG##f_rr, "if (!Pv4) "OPER"(Rs32+Rt32<<#u2)", ATTRIB,DESCR,{fEA_RRs(RsV,RtV,uiV); if(fLSBOLDNOT(PvV)){ SEMANTICS; } else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L4_p##TAG##tnew_rr,"if (Pv4.new) "OPER"(Rs32+Rt32<<#u2)",ATTRIB,DESCR,{fEA_RRs(RsV,RtV,uiV); if (fLSBNEW(PvN)) { SEMANTICS; } else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L4_p##TAG##fnew_rr,"if (!Pv4.new) "OPER"(Rs32+Rt32<<#u2)",ATTRIB,DESCR,{fEA_RRs(RsV,RtV,uiV); if (fLSBNEWNOT(PvN)) { SEMANTICS; } else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L2_p##TAG##tnew_pi, "if (Pt4.new) "OPER"(Rx32++#s4:"SHFT")", ATTRIB,DESCR,{fEA_REG(RxV); if(fLSBNEW(PtN)){ fPM_I(RxV,siV); SEMANTICS;} else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L2_p##TAG##fnew_pi, "if (!Pt4.new) "OPER"(Rx32++#s4:"SHFT")", ATTRIB,DESCR,{fEA_REG(RxV); if(fLSBNEWNOT(PtN)){ fPM_I(RxV,siV); SEMANTICS;} else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L4_p##TAG##t_abs, "if (Pt4) "OPER"(#u6)", ATTRIB,DESCR,{fMUST_IMMEXT(uiV); fEA_IMM(uiV); if(fLSBOLD(PtV)){ SEMANTICS;} else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L4_p##TAG##f_abs, "if (!Pt4) "OPER"(#u6)", ATTRIB,DESCR,{fMUST_IMMEXT(uiV); fEA_IMM(uiV); if(fLSBOLDNOT(PtV)){ SEMANTICS; } else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L4_p##TAG##tnew_abs,"if (Pt4.new) "OPER"(#u6)",ATTRIB,DESCR,{fMUST_IMMEXT(uiV); fEA_IMM(uiV);if (fLSBNEW(PtN)) { SEMANTICS; } else {LOAD_CANCEL(EA);}})\
|
||||
Q6INSN(L4_p##TAG##fnew_abs,"if (!Pt4.new) "OPER"(#u6)",ATTRIB,DESCR,{fMUST_IMMEXT(uiV); fEA_IMM(uiV);if (fLSBNEWNOT(PtN)) { SEMANTICS; } else {LOAD_CANCEL(EA);}})
|
||||
|
||||
|
||||
|
||||
/* The set of 32-bit predicated load instructions */
|
||||
STD_PLD_AMODES(loadrub,"Rd32=memub","Load Unsigned Byte",ATTRIBS(A_ARCHV2,A_LOAD),"0",0,fLOAD(1,1,u,EA,RdV))
|
||||
STD_PLD_AMODES(loadrb, "Rd32=memb", "Load signed Byte",ATTRIBS(A_ARCHV2,A_LOAD),"0",0,fLOAD(1,1,s,EA,RdV))
|
||||
STD_PLD_AMODES(loadruh,"Rd32=memuh","Load unsigned Half integer",ATTRIBS(A_ARCHV2,A_LOAD),"1",1,fLOAD(1,2,u,EA,RdV))
|
||||
STD_PLD_AMODES(loadrh, "Rd32=memh", "Load signed Half integer",ATTRIBS(A_ARCHV2,A_LOAD),"1",1,fLOAD(1,2,s,EA,RdV))
|
||||
STD_PLD_AMODES(loadri, "Rd32=memw", "Load Word",ATTRIBS(A_ARCHV2,A_LOAD),"2",2,fLOAD(1,4,u,EA,RdV))
|
||||
STD_PLD_AMODES(loadrd, "Rdd32=memd","Load Double integer",ATTRIBS(A_ARCHV2,A_LOAD),"3",3,fLOAD(1,8,u,EA,RddV))
|
||||
|
||||
/* The set of addressing modes standard to all predicated store instructions */
|
||||
#define STD_PST_AMODES(TAG,DEST,OPER,DESCR,ATTRIB,SHFT,SHFTNUM,SEMANTICS)\
|
||||
Q6INSN(S4_##TAG##_rr, OPER"(Rs32+Ru32<<#u2)="DEST, ATTRIB,DESCR,{fEA_RRs(RsV,RuV,uiV); SEMANTICS;})\
|
||||
Q6INSN(S2_p##TAG##t_io, "if (Pv4) "OPER"(Rs32+#u6:"SHFT")="DEST, ATTRIB,DESCR,{fIMMEXT(uiV); fEA_RI(RsV,uiV); if (fLSBOLD(PvV)){ SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S2_p##TAG##t_pi, "if (Pv4) "OPER"(Rx32++#s4:"SHFT")="DEST, ATTRIB,DESCR,{fEA_REG(RxV); if (fLSBOLD(PvV)){ fPM_I(RxV,siV); SEMANTICS;} else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S2_p##TAG##f_io, "if (!Pv4) "OPER"(Rs32+#u6:"SHFT")="DEST, ATTRIB,DESCR,{fIMMEXT(uiV); fEA_RI(RsV,uiV); if (fLSBOLDNOT(PvV)){ SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S2_p##TAG##f_pi, "if (!Pv4) "OPER"(Rx32++#s4:"SHFT")="DEST, ATTRIB,DESCR,{fEA_REG(RxV); if (fLSBOLDNOT(PvV)){ fPM_I(RxV,siV); SEMANTICS;} else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_p##TAG##t_rr, "if (Pv4) "OPER"(Rs32+Ru32<<#u2)="DEST, ATTRIB,DESCR,{fEA_RRs(RsV,RuV,uiV); if (fLSBOLD(PvV)){ SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_p##TAG##f_rr, "if (!Pv4) "OPER"(Rs32+Ru32<<#u2)="DEST, ATTRIB,DESCR,{fEA_RRs(RsV,RuV,uiV); if (fLSBOLDNOT(PvV)){ SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_p##TAG##tnew_io,"if (Pv4.new) "OPER"(Rs32+#u6:"SHFT")="DEST,ATTRIB,DESCR,{fIMMEXT(uiV); fEA_RI(RsV,uiV); if ( fLSBNEW(PvN)) { SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_p##TAG##fnew_io,"if (!Pv4.new) "OPER"(Rs32+#u6:"SHFT")="DEST,ATTRIB,DESCR,{fIMMEXT(uiV); fEA_RI(RsV,uiV); if (fLSBNEWNOT(PvN)) { SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_p##TAG##tnew_rr,"if (Pv4.new) "OPER"(Rs32+Ru32<<#u2)="DEST,ATTRIB,DESCR,{fEA_RRs(RsV,RuV,uiV); if ( fLSBNEW(PvN)) { SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_p##TAG##fnew_rr,"if (!Pv4.new) "OPER"(Rs32+Ru32<<#u2)="DEST,ATTRIB,DESCR,{fEA_RRs(RsV,RuV,uiV); if (fLSBNEWNOT(PvN)) { SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S2_p##TAG##tnew_pi, "if (Pv4.new) "OPER"(Rx32++#s4:"SHFT")="DEST, ATTRIB,DESCR,{fEA_REG(RxV); if (fLSBNEW(PvN)){ fPM_I(RxV,siV); SEMANTICS;} else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S2_p##TAG##fnew_pi, "if (!Pv4.new) "OPER"(Rx32++#s4:"SHFT")="DEST, ATTRIB,DESCR,{fEA_REG(RxV); if (fLSBNEWNOT(PvN)){ fPM_I(RxV,siV); SEMANTICS;} else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_p##TAG##t_abs, "if (Pv4) "OPER"(#u6)="DEST, ATTRIB,DESCR,{fMUST_IMMEXT(uiV); fEA_IMM(uiV); if (fLSBOLD(PvV)){ SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_p##TAG##f_abs, "if (!Pv4) "OPER"(#u6)="DEST, ATTRIB,DESCR,{fMUST_IMMEXT(uiV);fEA_IMM(uiV); if (fLSBOLDNOT(PvV)){ SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_p##TAG##tnew_abs,"if (Pv4.new) "OPER"(#u6)="DEST,ATTRIB,DESCR,{fMUST_IMMEXT(uiV);fEA_IMM(uiV); if ( fLSBNEW(PvN)) { SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_p##TAG##fnew_abs,"if (!Pv4.new) "OPER"(#u6)="DEST,ATTRIB,DESCR,{fMUST_IMMEXT(uiV);fEA_IMM(uiV); if (fLSBNEWNOT(PvN)) { SEMANTICS; } else {STORE_CANCEL(EA);}})
|
||||
|
||||
|
||||
|
||||
|
||||
/* The set of 32-bit predicated store instructions */
|
||||
STD_PST_AMODES(storerb,"Rt32","memb","Store Byte",ATTRIBS(A_ARCHV2,A_STORE),"0",0,fSTORE(1,1,EA,fGETBYTE(0,RtV)))
|
||||
STD_PST_AMODES(storerh,"Rt32","memh","Store Half integer",ATTRIBS(A_ARCHV2,A_STORE),"1",1,fSTORE(1,2,EA,fGETHALF(0,RtV)))
|
||||
STD_PST_AMODES(storerf,"Rt.H32","memh","Store Upper Half integer",ATTRIBS(A_ARCHV2,A_STORE),"1",1,fSTORE(1,2,EA,fGETHALF(1,RtV)))
|
||||
STD_PST_AMODES(storeri,"Rt32","memw","Store Word",ATTRIBS(A_ARCHV2,A_STORE),"2",2,fSTORE(1,4,EA,RtV))
|
||||
STD_PST_AMODES(storerd,"Rtt32","memd","Store Double integer",ATTRIBS(A_ARCHV2,A_STORE),"3",3,fSTORE(1,8,EA,RttV))
|
||||
STD_PST_AMODES(storerinew,"Nt8.new","memw","Store Word",ATTRIBS(A_ARCHV2,A_STORE),"2",2,fSTORE(1,4,EA,fNEWREG_ST(NtN)))
|
||||
STD_PST_AMODES(storerbnew,"Nt8.new","memb","Store Byte",ATTRIBS(A_ARCHV2,A_STORE),"0",0,fSTORE(1,1,EA,fGETBYTE(0,fNEWREG_ST(NtN))))
|
||||
STD_PST_AMODES(storerhnew,"Nt8.new","memh","Store Half integer",ATTRIBS(A_ARCHV2,A_STORE),"1",1,fSTORE(1,2,EA,fGETHALF(0,fNEWREG_ST(NtN))))
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/* */
|
||||
/* Mem-Ops (Load-op-Store) */
|
||||
/* */
|
||||
/*****************************************************************/
|
||||
|
||||
/* The set of 32-bit non-predicated mem-ops */
|
||||
#define STD_MEMOP_AMODES(TAG,OPER,DESCR,SEMANTICS)\
|
||||
Q6INSN(L4_##TAG##w_io, "memw(Rs32+#u6:2)"OPER, ATTRIBS(A_RESTRICT_SLOT0ONLY),DESCR,{fIMMEXT(uiV); fEA_RI(RsV,uiV); fHIDE(size4s_t tmp;) fLOAD(1,4,s,EA,tmp); SEMANTICS; fSTORE(1,4,EA,tmp); })\
|
||||
Q6INSN(L4_##TAG##b_io, "memb(Rs32+#u6:0)"OPER, ATTRIBS(A_RESTRICT_SLOT0ONLY),DESCR,{fIMMEXT(uiV); fEA_RI(RsV,uiV); fHIDE(size4s_t tmp;) fLOAD(1,1,s,EA,tmp); SEMANTICS; fSTORE(1,1,EA,tmp); })\
|
||||
Q6INSN(L4_##TAG##h_io, "memh(Rs32+#u6:1)"OPER, ATTRIBS(A_RESTRICT_SLOT0ONLY),DESCR,{fIMMEXT(uiV); fEA_RI(RsV,uiV); fHIDE(size4s_t tmp;) fLOAD(1,2,s,EA,tmp); SEMANTICS; fSTORE(1,2,EA,tmp); })
|
||||
|
||||
|
||||
|
||||
STD_MEMOP_AMODES(add_memop, "+=Rt32", "Add Register to Memory Word", tmp += RtV)
|
||||
STD_MEMOP_AMODES(sub_memop, "-=Rt32", "Sub Register from Memory Word", tmp -= RtV)
|
||||
STD_MEMOP_AMODES(and_memop, "&=Rt32", "Logical AND Register to Memory Word", tmp &= RtV)
|
||||
STD_MEMOP_AMODES(or_memop, "|=Rt32", "Logical OR Register to Memory Word", tmp |= RtV)
|
||||
|
||||
|
||||
STD_MEMOP_AMODES(iadd_memop, "+=#U5", "Add Immediate to Memory Word", tmp += UiV)
|
||||
STD_MEMOP_AMODES(isub_memop, "-=#U5", "Sub Immediate to Memory Word", tmp -= UiV)
|
||||
STD_MEMOP_AMODES(iand_memop, "=clrbit(#U5)", "Clear a bit in memory", tmp &= (~(1<<UiV)))
|
||||
STD_MEMOP_AMODES(ior_memop, "=setbit(#U5)", "Set a bit in memory", tmp |= (1<<UiV))
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/* */
|
||||
/* V4 store immediates */
|
||||
/* */
|
||||
/*****************************************************************/
|
||||
/* Predicated Store immediates */
|
||||
#define V4_PSTI_AMODES(TAG,DEST,OPER,DESCR,ATTRIB,SHFT,SEMANTICS)\
|
||||
Q6INSN(S4_##TAG##t_io,"if (Pv4) "OPER"(Rs32+#u6:"SHFT")="DEST,ATTRIB,DESCR,{fEA_RI(RsV,uiV); if (fLSBOLD(PvV)){ SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_##TAG##f_io,"if (!Pv4) "OPER"(Rs32+#u6:"SHFT")="DEST,ATTRIB,DESCR,{fEA_RI(RsV,uiV); if (fLSBOLDNOT(PvV)){ SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_##TAG##tnew_io,"if (Pv4.new) "OPER"(Rs32+#u6:"SHFT")="DEST,ATTRIB,DESCR,{fEA_RI(RsV,uiV); if (fLSBNEW(PvN)){ SEMANTICS; } else {STORE_CANCEL(EA);}})\
|
||||
Q6INSN(S4_##TAG##fnew_io,"if (!Pv4.new) "OPER"(Rs32+#u6:"SHFT")="DEST,ATTRIB,DESCR,{fEA_RI(RsV,uiV); if (fLSBNEWNOT(PvN)){ SEMANTICS; } else {STORE_CANCEL(EA);}})
|
||||
|
||||
/* The set of 32-bit store immediate instructions */
|
||||
V4_PSTI_AMODES(storeirb,"#S6","memb","Store Immediate Byte",ATTRIBS(A_ARCHV2,A_STORE),"0",fIMMEXT(SiV); fSTORE(1,1,EA,SiV))
|
||||
V4_PSTI_AMODES(storeirh,"#S6","memh","Store Immediate Half integer",ATTRIBS(A_ARCHV2,A_STORE),"1",fIMMEXT(SiV); fSTORE(1,2,EA,SiV))
|
||||
V4_PSTI_AMODES(storeiri,"#S6","memw","Store Immediate Word",ATTRIBS(A_ARCHV2,A_STORE),"2",fIMMEXT(SiV); fSTORE(1,4,EA,SiV))
|
||||
|
||||
|
||||
/* Non-predicated store immediates */
|
||||
#define V4_STI_AMODES(TAG,DEST,OPER,DESCR,ATTRIB,SHFT,SEMANTICS)\
|
||||
Q6INSN(S4_##TAG##_io, OPER"(Rs32+#u6:"SHFT")="DEST, ATTRIB,DESCR,{fEA_RI(RsV,uiV); SEMANTICS; })
|
||||
|
||||
/* The set of 32-bit store immediate instructions */
|
||||
V4_STI_AMODES(storeirb,"#S8","memb","Store Immediate Byte",ATTRIBS(A_ARCHV2,A_STORE),"0",fIMMEXT(SiV); fSTORE(1,1,EA,SiV))
|
||||
V4_STI_AMODES(storeirh,"#S8","memh","Store Immediate Half integer",ATTRIBS(A_ARCHV2,A_STORE),"1",fIMMEXT(SiV); fSTORE(1,2,EA,SiV))
|
||||
V4_STI_AMODES(storeiri,"#S8","memw","Store Immediate Word",ATTRIBS(A_ARCHV2,A_STORE),"2",fIMMEXT(SiV); fSTORE(1,4,EA,SiV))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/* */
|
||||
/* V2 GP-relative LD/ST */
|
||||
/* */
|
||||
/*****************************************************************/
|
||||
|
||||
#define STD_GPLD_AMODES(TAG,OPER,DESCR,ATTRIB,SHFT,SEMANTICS)\
|
||||
Q6INSN(L2_##TAG##gp, OPER"(gp+#u16:"SHFT")", ATTRIB,DESCR,{fIMMEXT(uiV); fEA_GPI(uiV); SEMANTICS; })
|
||||
|
||||
/* The set of 32-bit load instructions */
|
||||
STD_GPLD_AMODES(loadrub,"Rd32=memub","Load Unsigned Byte",ATTRIBS(A_LOAD,A_ARCHV2),"0",fLOAD(1,1,u,EA,RdV))
|
||||
STD_GPLD_AMODES(loadrb, "Rd32=memb", "Load signed Byte",ATTRIBS(A_LOAD,A_ARCHV2),"0",fLOAD(1,1,s,EA,RdV))
|
||||
STD_GPLD_AMODES(loadruh,"Rd32=memuh","Load unsigned Half integer",ATTRIBS(A_LOAD,A_ARCHV2),"1",fLOAD(1,2,u,EA,RdV))
|
||||
STD_GPLD_AMODES(loadrh, "Rd32=memh", "Load signed Half integer",ATTRIBS(A_LOAD,A_ARCHV2),"1",fLOAD(1,2,s,EA,RdV))
|
||||
STD_GPLD_AMODES(loadri, "Rd32=memw", "Load Word",ATTRIBS(A_LOAD,A_ARCHV2),"2",fLOAD(1,4,u,EA,RdV))
|
||||
STD_GPLD_AMODES(loadrd, "Rdd32=memd","Load Double integer",ATTRIBS(A_LOAD,A_ARCHV2),"3",fLOAD(1,8,u,EA,RddV))
|
||||
|
||||
|
||||
#define STD_GPST_AMODES(TAG,DEST,OPER,DESCR,ATTRIB,SHFT,SEMANTICS)\
|
||||
Q6INSN(S2_##TAG##gp, OPER"(gp+#u16:"SHFT")="DEST, ATTRIB,DESCR,{fIMMEXT(uiV); fEA_GPI(uiV); SEMANTICS; })
|
||||
|
||||
/* The set of 32-bit store instructions */
|
||||
STD_GPST_AMODES(storerb, "Rt32", "memb","Store Byte",ATTRIBS(A_STORE,A_ARCHV2),"0",fSTORE(1,1,EA,fGETBYTE(0,RtV)))
|
||||
STD_GPST_AMODES(storerh, "Rt32", "memh","Store Half integer",ATTRIBS(A_STORE,A_ARCHV2),"1",fSTORE(1,2,EA,fGETHALF(0,RtV)))
|
||||
STD_GPST_AMODES(storerf, "Rt.H32", "memh","Store Upper Half integer",ATTRIBS(A_STORE,A_ARCHV2),"1",fSTORE(1,2,EA,fGETHALF(1,RtV)))
|
||||
STD_GPST_AMODES(storeri, "Rt32", "memw","Store Word",ATTRIBS(A_STORE,A_ARCHV2),"2",fSTORE(1,4,EA,RtV))
|
||||
STD_GPST_AMODES(storerd, "Rtt32","memd","Store Double integer",ATTRIBS(A_STORE,A_ARCHV2),"3",fSTORE(1,8,EA,RttV))
|
||||
STD_GPST_AMODES(storerinew, "Nt8.new", "memw","Store Word",ATTRIBS(A_STORE,A_ARCHV2),"2",fSTORE(1,4,EA,fNEWREG_ST(NtN)))
|
||||
STD_GPST_AMODES(storerbnew, "Nt8.new", "memb","Store Byte",ATTRIBS(A_STORE,A_ARCHV2),"0",fSTORE(1,1,EA,fGETBYTE(0,fNEWREG_ST(NtN))))
|
||||
STD_GPST_AMODES(storerhnew, "Nt8.new", "memh","Store Half integer",ATTRIBS(A_STORE,A_ARCHV2),"1",fSTORE(1,2,EA,fGETHALF(0,fNEWREG_ST(NtN))))
|
1531
target/hexagon/imported/macros.def
Executable file
1531
target/hexagon/imported/macros.def
Executable file
File diff suppressed because it is too large
Load Diff
1208
target/hexagon/imported/mpy.idef
Normal file
1208
target/hexagon/imported/mpy.idef
Normal file
File diff suppressed because it is too large
Load Diff
1066
target/hexagon/imported/shift.idef
Normal file
1066
target/hexagon/imported/shift.idef
Normal file
File diff suppressed because it is too large
Load Diff
149
target/hexagon/imported/subinsns.idef
Normal file
149
target/hexagon/imported/subinsns.idef
Normal file
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* sub-instructions
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/* */
|
||||
/* A-type subinsns */
|
||||
/* */
|
||||
/*****************************************************************/
|
||||
|
||||
Q6INSN(SA1_addi, "Rx16=add(Rx16,#s7)", ATTRIBS(A_SUBINSN),"Add", { fIMMEXT(siV); RxV=RxV+siV;})
|
||||
Q6INSN(SA1_tfr, "Rd16=Rs16", ATTRIBS(A_SUBINSN),"Tfr", { RdV=RsV;})
|
||||
Q6INSN(SA1_seti, "Rd16=#u6", ATTRIBS(A_SUBINSN),"Set immed", { fIMMEXT(uiV); RdV=uiV;})
|
||||
Q6INSN(SA1_setin1, "Rd16=#-1", ATTRIBS(A_SUBINSN),"Set to -1", { RdV=-1;})
|
||||
Q6INSN(SA1_clrtnew, "if (p0.new) Rd16=#0", ATTRIBS(A_SUBINSN),"clear if true", { if (fLSBNEW0) {RdV=0;} else {CANCEL;} })
|
||||
Q6INSN(SA1_clrfnew, "if (!p0.new) Rd16=#0", ATTRIBS(A_SUBINSN),"clear if false",{ if (fLSBNEW0NOT) {RdV=0;} else {CANCEL;} })
|
||||
Q6INSN(SA1_clrt, "if (p0) Rd16=#0", ATTRIBS(A_SUBINSN),"clear if true", { if (fLSBOLD(fREAD_P0())) {RdV=0;} else {CANCEL;} })
|
||||
Q6INSN(SA1_clrf, "if (!p0) Rd16=#0", ATTRIBS(A_SUBINSN),"clear if false",{ if (fLSBOLDNOT(fREAD_P0())) {RdV=0;} else {CANCEL;} })
|
||||
|
||||
Q6INSN(SA1_addsp, "Rd16=add(r29,#u6:2)", ATTRIBS(A_SUBINSN),"Add", { RdV=fREAD_SP()+uiV; })
|
||||
Q6INSN(SA1_inc, "Rd16=add(Rs16,#1)", ATTRIBS(A_SUBINSN),"Inc", { RdV=RsV+1;})
|
||||
Q6INSN(SA1_dec, "Rd16=add(Rs16,#-1)", ATTRIBS(A_SUBINSN),"Dec", { RdV=RsV-1;})
|
||||
Q6INSN(SA1_addrx, "Rx16=add(Rx16,Rs16)", ATTRIBS(A_SUBINSN),"Add", { RxV=RxV+RsV; })
|
||||
Q6INSN(SA1_zxtb, "Rd16=and(Rs16,#255)", ATTRIBS(A_SUBINSN),"Zxtb", { RdV= fZXTN(8,32,RsV);})
|
||||
Q6INSN(SA1_and1, "Rd16=and(Rs16,#1)", ATTRIBS(A_SUBINSN),"And #1", { RdV= RsV&1;})
|
||||
Q6INSN(SA1_sxtb, "Rd16=sxtb(Rs16)", ATTRIBS(A_SUBINSN),"Sxtb", { RdV= fSXTN(8,32,RsV);})
|
||||
Q6INSN(SA1_zxth, "Rd16=zxth(Rs16)", ATTRIBS(A_SUBINSN),"Zxth", { RdV= fZXTN(16,32,RsV);})
|
||||
Q6INSN(SA1_sxth, "Rd16=sxth(Rs16)", ATTRIBS(A_SUBINSN),"Sxth", { RdV= fSXTN(16,32,RsV);})
|
||||
Q6INSN(SA1_combinezr,"Rdd8=combine(#0,Rs16)", ATTRIBS(A_SUBINSN),"Combines", { fSETWORD(0,RddV,RsV); fSETWORD(1,RddV,0); })
|
||||
Q6INSN(SA1_combinerz,"Rdd8=combine(Rs16,#0)", ATTRIBS(A_SUBINSN),"Combines", { fSETWORD(0,RddV,0); fSETWORD(1,RddV,RsV); })
|
||||
Q6INSN(SA1_combine0i,"Rdd8=combine(#0,#u2)", ATTRIBS(A_SUBINSN),"Combines", { fSETWORD(0,RddV,uiV); fSETWORD(1,RddV,0); })
|
||||
Q6INSN(SA1_combine1i,"Rdd8=combine(#1,#u2)", ATTRIBS(A_SUBINSN),"Combines", { fSETWORD(0,RddV,uiV); fSETWORD(1,RddV,1); })
|
||||
Q6INSN(SA1_combine2i,"Rdd8=combine(#2,#u2)", ATTRIBS(A_SUBINSN),"Combines", { fSETWORD(0,RddV,uiV); fSETWORD(1,RddV,2); })
|
||||
Q6INSN(SA1_combine3i,"Rdd8=combine(#3,#u2)", ATTRIBS(A_SUBINSN),"Combines", { fSETWORD(0,RddV,uiV); fSETWORD(1,RddV,3); })
|
||||
Q6INSN(SA1_cmpeqi, "p0=cmp.eq(Rs16,#u2)", ATTRIBS(A_SUBINSN),"CompareImmed",{fWRITE_P0(f8BITSOF(RsV==uiV));})
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/* */
|
||||
/* Ld1/2 subinsns */
|
||||
/* */
|
||||
/*****************************************************************/
|
||||
|
||||
Q6INSN(SL1_loadri_io, "Rd16=memw(Rs16+#u4:2)", ATTRIBS(A_LOAD,A_SUBINSN),"load word", {fEA_RI(RsV,uiV); fLOAD(1,4,u,EA,RdV);})
|
||||
Q6INSN(SL1_loadrub_io, "Rd16=memub(Rs16+#u4:0)",ATTRIBS(A_LOAD,A_SUBINSN),"load byte", {fEA_RI(RsV,uiV); fLOAD(1,1,u,EA,RdV);})
|
||||
|
||||
Q6INSN(SL2_loadrh_io, "Rd16=memh(Rs16+#u3:1)", ATTRIBS(A_LOAD,A_SUBINSN),"load half", {fEA_RI(RsV,uiV); fLOAD(1,2,s,EA,RdV);})
|
||||
Q6INSN(SL2_loadruh_io, "Rd16=memuh(Rs16+#u3:1)",ATTRIBS(A_LOAD,A_SUBINSN),"load half", {fEA_RI(RsV,uiV); fLOAD(1,2,u,EA,RdV);})
|
||||
Q6INSN(SL2_loadrb_io, "Rd16=memb(Rs16+#u3:0)", ATTRIBS(A_LOAD,A_SUBINSN),"load byte", {fEA_RI(RsV,uiV); fLOAD(1,1,s,EA,RdV);})
|
||||
Q6INSN(SL2_loadri_sp, "Rd16=memw(r29+#u5:2)", ATTRIBS(A_LOAD,A_SUBINSN),"load word", {fEA_RI(fREAD_SP(),uiV); fLOAD(1,4,u,EA,RdV);})
|
||||
Q6INSN(SL2_loadrd_sp, "Rdd8=memd(r29+#u5:3)", ATTRIBS(A_LOAD,A_SUBINSN),"load dword",{fEA_RI(fREAD_SP(),uiV); fLOAD(1,8,u,EA,RddV);})
|
||||
|
||||
Q6INSN(SL2_deallocframe,"deallocframe", ATTRIBS(A_SUBINSN,A_LOAD), "Deallocate stack frame",
|
||||
{ fHIDE(size8u_t tmp;) fEA_REG(fREAD_FP());
|
||||
fLOAD(1,8,u,EA,tmp);
|
||||
tmp = fFRAME_UNSCRAMBLE(tmp);
|
||||
fWRITE_LR(fGETWORD(1,tmp));
|
||||
fWRITE_FP(fGETWORD(0,tmp));
|
||||
fWRITE_SP(EA+8); })
|
||||
|
||||
Q6INSN(SL2_return,"dealloc_return", ATTRIBS(A_JINDIR,A_SUBINSN,A_LOAD,A_RETURN,A_RESTRICT_SLOT0ONLY), "Deallocate stack frame and return",
|
||||
{ fHIDE(size8u_t tmp;) fEA_REG(fREAD_FP());
|
||||
fLOAD(1,8,u,EA,tmp);
|
||||
tmp = fFRAME_UNSCRAMBLE(tmp);
|
||||
fWRITE_LR(fGETWORD(1,tmp));
|
||||
fWRITE_FP(fGETWORD(0,tmp));
|
||||
fWRITE_SP(EA+8);
|
||||
fJUMPR(REG_LR,fGETWORD(1,tmp),COF_TYPE_JUMPR);})
|
||||
|
||||
Q6INSN(SL2_return_t,"if (p0) dealloc_return", ATTRIBS(A_JINDIROLD,A_SUBINSN,A_LOAD,A_RETURN,A_RESTRICT_SLOT0ONLY), "Deallocate stack frame and return",
|
||||
{ fHIDE(size8u_t tmp;); fBRANCH_SPECULATE_STALL(fLSBOLD(fREAD_P0()),, SPECULATE_NOT_TAKEN,4,0); fEA_REG(fREAD_FP()); if (fLSBOLD(fREAD_P0())) { fLOAD(1,8,u,EA,tmp); tmp = fFRAME_UNSCRAMBLE(tmp); fWRITE_LR(fGETWORD(1,tmp)); fWRITE_FP(fGETWORD(0,tmp)); fWRITE_SP(EA+8);
|
||||
fJUMPR(REG_LR,fGETWORD(1,tmp),COF_TYPE_JUMPR);} else {LOAD_CANCEL(EA);} })
|
||||
|
||||
Q6INSN(SL2_return_f,"if (!p0) dealloc_return", ATTRIBS(A_JINDIROLD,A_SUBINSN,A_LOAD,A_RETURN,A_RESTRICT_SLOT0ONLY), "Deallocate stack frame and return",
|
||||
{ fHIDE(size8u_t tmp;);fBRANCH_SPECULATE_STALL(fLSBOLDNOT(fREAD_P0()),, SPECULATE_NOT_TAKEN,4,0); fEA_REG(fREAD_FP()); if (fLSBOLDNOT(fREAD_P0())) { fLOAD(1,8,u,EA,tmp); tmp = fFRAME_UNSCRAMBLE(tmp); fWRITE_LR(fGETWORD(1,tmp)); fWRITE_FP(fGETWORD(0,tmp)); fWRITE_SP(EA+8);
|
||||
fJUMPR(REG_LR,fGETWORD(1,tmp),COF_TYPE_JUMPR);} else {LOAD_CANCEL(EA);} })
|
||||
|
||||
|
||||
|
||||
Q6INSN(SL2_return_tnew,"if (p0.new) dealloc_return:nt", ATTRIBS(A_JINDIRNEW,A_SUBINSN,A_LOAD,A_RETURN,A_RESTRICT_SLOT0ONLY), "Deallocate stack frame and return",
|
||||
{ fHIDE(size8u_t tmp;) fBRANCH_SPECULATE_STALL(fLSBNEW0,, SPECULATE_NOT_TAKEN , 4,3); fEA_REG(fREAD_FP()); if (fLSBNEW0) { fLOAD(1,8,u,EA,tmp); tmp = fFRAME_UNSCRAMBLE(tmp); fWRITE_LR(fGETWORD(1,tmp)); fWRITE_FP(fGETWORD(0,tmp)); fWRITE_SP(EA+8);
|
||||
fJUMPR(REG_LR,fGETWORD(1,tmp),COF_TYPE_JUMPR);} else {LOAD_CANCEL(EA);} })
|
||||
|
||||
Q6INSN(SL2_return_fnew,"if (!p0.new) dealloc_return:nt", ATTRIBS(A_JINDIRNEW,A_SUBINSN,A_LOAD,A_RETURN,A_RESTRICT_SLOT0ONLY), "Deallocate stack frame and return",
|
||||
{ fHIDE(size8u_t tmp;) fBRANCH_SPECULATE_STALL(fLSBNEW0NOT,, SPECULATE_NOT_TAKEN , 4,3); fEA_REG(fREAD_FP()); if (fLSBNEW0NOT) { fLOAD(1,8,u,EA,tmp); tmp = fFRAME_UNSCRAMBLE(tmp); fWRITE_LR(fGETWORD(1,tmp)); fWRITE_FP(fGETWORD(0,tmp)); fWRITE_SP(EA+8);
|
||||
fJUMPR(REG_LR,fGETWORD(1,tmp),COF_TYPE_JUMPR);} else {LOAD_CANCEL(EA);} })
|
||||
|
||||
|
||||
Q6INSN(SL2_jumpr31,"jumpr r31",ATTRIBS(A_SUBINSN,A_JINDIR,A_RESTRICT_SLOT0ONLY),"indirect unconditional jump",
|
||||
{ fJUMPR(REG_LR,fREAD_LR(),COF_TYPE_JUMPR);})
|
||||
|
||||
Q6INSN(SL2_jumpr31_t,"if (p0) jumpr r31",ATTRIBS(A_SUBINSN,A_JINDIROLD,A_RESTRICT_SLOT0ONLY),"indirect conditional jump if true",
|
||||
{fBRANCH_SPECULATE_STALL(fLSBOLD(fREAD_P0()),, SPECULATE_TAKEN,4,0); if (fLSBOLD(fREAD_P0())) {fJUMPR(REG_LR,fREAD_LR(),COF_TYPE_JUMPR);}})
|
||||
|
||||
Q6INSN(SL2_jumpr31_f,"if (!p0) jumpr r31",ATTRIBS(A_SUBINSN,A_JINDIROLD,A_RESTRICT_SLOT0ONLY),"indirect conditional jump if false",
|
||||
{fBRANCH_SPECULATE_STALL(fLSBOLDNOT(fREAD_P0()),, SPECULATE_TAKEN,4,0); if (fLSBOLDNOT(fREAD_P0())) {fJUMPR(REG_LR,fREAD_LR(),COF_TYPE_JUMPR);}})
|
||||
|
||||
|
||||
|
||||
Q6INSN(SL2_jumpr31_tnew,"if (p0.new) jumpr:nt r31",ATTRIBS(A_SUBINSN,A_JINDIRNEW,A_RESTRICT_SLOT0ONLY),"indirect conditional jump if true",
|
||||
{fBRANCH_SPECULATE_STALL(fLSBNEW0,, SPECULATE_NOT_TAKEN , 4,3); if (fLSBNEW0) {fJUMPR(REG_LR,fREAD_LR(),COF_TYPE_JUMPR);}})
|
||||
|
||||
Q6INSN(SL2_jumpr31_fnew,"if (!p0.new) jumpr:nt r31",ATTRIBS(A_SUBINSN,A_JINDIRNEW,A_RESTRICT_SLOT0ONLY),"indirect conditional jump if false",
|
||||
{fBRANCH_SPECULATE_STALL(fLSBNEW0NOT,, SPECULATE_NOT_TAKEN , 4,3); if (fLSBNEW0NOT) {fJUMPR(REG_LR,fREAD_LR(),COF_TYPE_JUMPR);}})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/* */
|
||||
/* St1/2 subinsns */
|
||||
/* */
|
||||
/*****************************************************************/
|
||||
|
||||
Q6INSN(SS1_storew_io, "memw(Rs16+#u4:2)=Rt16", ATTRIBS(A_STORE,A_SUBINSN), "store word", {fEA_RI(RsV,uiV); fSTORE(1,4,EA,RtV);})
|
||||
Q6INSN(SS1_storeb_io, "memb(Rs16+#u4:0)=Rt16", ATTRIBS(A_STORE,A_SUBINSN), "store byte", {fEA_RI(RsV,uiV); fSTORE(1,1,EA,fGETBYTE(0,RtV));})
|
||||
Q6INSN(SS2_storeh_io, "memh(Rs16+#u3:1)=Rt16", ATTRIBS(A_STORE,A_SUBINSN), "store half", {fEA_RI(RsV,uiV); fSTORE(1,2,EA,fGETHALF(0,RtV));})
|
||||
Q6INSN(SS2_stored_sp, "memd(r29+#s6:3)=Rtt8", ATTRIBS(A_STORE,A_SUBINSN), "store dword",{fEA_RI(fREAD_SP(),siV); fSTORE(1,8,EA,RttV);})
|
||||
Q6INSN(SS2_storew_sp, "memw(r29+#u5:2)=Rt16", ATTRIBS(A_STORE,A_SUBINSN), "store word", {fEA_RI(fREAD_SP(),uiV); fSTORE(1,4,EA,RtV);})
|
||||
Q6INSN(SS2_storewi0, "memw(Rs16+#u4:2)=#0", ATTRIBS(A_STORE,A_SUBINSN), "store word", {fEA_RI(RsV,uiV); fSTORE(1,4,EA,0);})
|
||||
Q6INSN(SS2_storebi0, "memb(Rs16+#u4:0)=#0", ATTRIBS(A_STORE,A_SUBINSN), "store byte", {fEA_RI(RsV,uiV); fSTORE(1,1,EA,0);})
|
||||
Q6INSN(SS2_storewi1, "memw(Rs16+#u4:2)=#1", ATTRIBS(A_STORE,A_SUBINSN), "store word", {fEA_RI(RsV,uiV); fSTORE(1,4,EA,1);})
|
||||
Q6INSN(SS2_storebi1, "memb(Rs16+#u4:0)=#1", ATTRIBS(A_STORE,A_SUBINSN), "store byte", {fEA_RI(RsV,uiV); fSTORE(1,1,EA,1);})
|
||||
|
||||
|
||||
Q6INSN(SS2_allocframe,"allocframe(#u5:3)", ATTRIBS(A_SUBINSN,A_STORE,A_RESTRICT_SLOT0ONLY), "Allocate stack frame",
|
||||
{ fEA_RI(fREAD_SP(),-8); fSTORE(1,8,EA,fFRAME_SCRAMBLE((fCAST8_8u(fREAD_LR()) << 32) | fCAST4_4u(fREAD_FP()))); fWRITE_FP(EA); fFRAMECHECK(EA-uiV,EA); fWRITE_SP(EA-uiV); })
|
68
target/hexagon/imported/system.idef
Normal file
68
target/hexagon/imported/system.idef
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* System Interface Instructions
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/********************************************/
|
||||
/* User->OS interface */
|
||||
/********************************************/
|
||||
|
||||
Q6INSN(J2_trap0,"trap0(#u8)",ATTRIBS(A_COF),
|
||||
"Trap to Operating System",
|
||||
fTRAP(0,uiV);
|
||||
)
|
||||
|
||||
Q6INSN(J2_pause,"pause(#u8)",ATTRIBS(A_COF),
|
||||
"Enter low-power state for #u8 cycles",{fPAUSE(uiV);})
|
||||
|
||||
Q6INSN(Y2_icinva,"icinva(Rs32)",ATTRIBS(A_ICOP,A_ICFLUSHOP),"Instruction Cache Invalidate Address",{fEA_REG(RsV); fICINVA(EA);})
|
||||
|
||||
Q6INSN(Y2_isync,"isync",ATTRIBS(),"Memory Synchronization",{fISYNC();})
|
||||
Q6INSN(Y2_barrier,"barrier",ATTRIBS(A_RESTRICT_SLOT0ONLY),"Memory Barrier",{fBARRIER();})
|
||||
Q6INSN(Y2_syncht,"syncht",ATTRIBS(A_RESTRICT_SLOT0ONLY),"Memory Synchronization",{fSYNCH();})
|
||||
|
||||
|
||||
Q6INSN(Y2_dcfetchbo,"dcfetch(Rs32+#u11:3)",ATTRIBS(A_RESTRICT_PREFERSLOT0,A_DCFETCH),"Data Cache Prefetch",{fEA_RI(RsV,uiV); fDCFETCH(EA);})
|
||||
|
||||
|
||||
Q6INSN(Y2_dczeroa,"dczeroa(Rs32)",ATTRIBS(A_STORE,A_RESTRICT_SLOT0ONLY,A_DCZEROA),"Zero an aligned 32-byte cacheline",{fEA_REG(RsV); fDCZEROA(EA);})
|
||||
Q6INSN(Y2_dccleana,"dccleana(Rs32)",ATTRIBS(A_RESTRICT_SLOT0ONLY,A_DCFLUSHOP),"Data Cache Clean Address",{fEA_REG(RsV); fDCCLEANA(EA);})
|
||||
Q6INSN(Y2_dccleaninva,"dccleaninva(Rs32)",ATTRIBS(A_RESTRICT_SLOT0ONLY,A_DCFLUSHOP),"Data Cache Clean and Invalidate Address",{fEA_REG(RsV); fDCCLEANINVA(EA);})
|
||||
Q6INSN(Y2_dcinva,"dcinva(Rs32)",ATTRIBS(A_RESTRICT_SLOT0ONLY,A_DCFLUSHOP),"Data Cache Invalidate Address",{fEA_REG(RsV); fDCCLEANINVA(EA);})
|
||||
|
||||
|
||||
Q6INSN(Y4_l2fetch,"l2fetch(Rs32,Rt32)",ATTRIBS(A_RESTRICT_SLOT0ONLY),"L2 Cache Prefetch",
|
||||
{ fL2FETCH(RsV,
|
||||
(RtV&0xff), /*height*/
|
||||
((RtV>>8)&0xff), /*width*/
|
||||
((RtV>>16)&0xffff), /*stride*/
|
||||
0); /*extra attrib flags*/
|
||||
})
|
||||
|
||||
|
||||
|
||||
Q6INSN(Y5_l2fetch,"l2fetch(Rs32,Rtt32)",ATTRIBS(A_RESTRICT_SLOT0ONLY),"L2 Cache Prefetch",
|
||||
{ fL2FETCH(RsV,
|
||||
fGETUHALF(0,RttV), /*height*/
|
||||
fGETUHALF(1,RttV), /*width*/
|
||||
fGETUHALF(2,RttV), /*stride*/
|
||||
fGETUHALF(3,RttV)); /*flags*/
|
||||
})
|
Loading…
Reference in New Issue
Block a user