附录C64x 汇编指令.docx
- 文档编号:14194255
- 上传时间:2023-06-21
- 格式:DOCX
- 页数:41
- 大小:23.41KB
附录C64x 汇编指令.docx
《附录C64x 汇编指令.docx》由会员分享,可在线阅读,更多相关《附录C64x 汇编指令.docx(41页珍藏版)》请在冰点文库上搜索。
附录C64x汇编指令
附录C64x汇编指令
TMS320C64x指令集
指令
语法
描述
ABS
ABS(.unit)src2,dst
.unit=.L1or.L2
Theabsolutevalueofsrc2isplacedindst.
ABS2
ABS2(.unit)src2,dst
.unit=.L1or.L2
Theabsolutevaluesoftheupperandlowerhalvesofthesrc2operandareplacedintheupperandlowerhalvesofthedst.
ADD
ADD(.unit)src1,src2,dst
.unit=.D1,.D2,.L1,.L2,.S1,.S2
src2isaddedtosrc1.Theresultisplacedindst.
ADDAB
ADDAB(.unit)src2,src1,dst
.unit=.D1or.D2
FortheC64xandC64x+CPU,src1isaddedtosrc2usingthebyteaddressingmodespecifiedforsrc2.Theadditiondefaultstolinearmode.However,ifsrc2isoneofA4-A7orB4-B7,themodecanbechangedtocircularmodebywritingtheappropriatevaluetotheAMR.Theresultisplacedindst.
ADDAD
ADDAD(.unit)src2,src1,dst
.unit=.D1or.D2
src1isaddedtosrc2usingthedoublewordaddressingmodespecifiedforsrc2.Theadditiondefaultstolinearmode.However,ifsrc2isoneofA4-A7orB4-B7,themodecanbechangedtocircularmodebywritingtheappropri-atevaluetotheAMR.src1isleftshiftedby3duetodoubleworddatasizes.Theresultisplacedindst.
ADDAH
ADDAH(.unit)src2,src1,dst
.unit=.D1or.D2
FortheC64xandC64x+CPU,src1isaddedtosrc2usingthehalfwordaddressingmodespecifiedforsrc2.Theadditiondefaultstolinearmode.However,ifsrc2isoneofA4-A7orB4-B7,themodecanbechangedtocircularmodebywritingtheappropriatevaluetotheAMR.Ifcircularaddressingisenabled,src1isleftshiftedby1.Theresultisplacedindst.
ADDAW
ADDAW(.unit)src2,src1,dst
.unit=.D1or.D2
FortheC64xandC64x+CPU,src1isaddedtosrc2usingthewordaddressingmodespecifiedforsrc2.Theadditiondefaultstolinearmode.However,ifsrc2isoneofA4-A7orB4-B7,themodecanbechangedtocircularmodebywritingtheappropriatevaluetotheAMR.Ifcircularaddressingisenabled,src1isleftshiftedby2.Theresultisplacedindst.
ADDK
ADDK(.unit)cst,dst
.unit=.S1or.S2
A16-bitsignedconstant,cst16,isaddedtothedstregisterspecified.Theresultisplacedindst.
ADDKPC
ADDKPC(.unit)src1,dst,src2
.unit=.S2
A7-bitsignedconstant,src1,isshifted2bitstotheleft,thenaddedtotheaddressofthefirstinstructionofthefetchpacketthatcontainstheADDKPCinstruction(PCE1).Theresultisplacedindst.The3-bitunsignedconstant,src2,specifiesthenumberofNOPcyclestoinsertafterthecurrentinstruction.Thisinstructionhelpsreducethenumberofinstructionsneededtosetupthereturnaddressforafunctioncall.
ADDU
ADDU(.unit)src1,src2,dst
.unit=.L1or.L2
src2isaddedtosrc1.Theresultisplacedindst
ADD2
ADD2(.unit)src1,src2,dst
.unit=.S1,.S2,.L1,.L2,.D1,.D2
Theupperandlowerhalvesofthesrc1operandareaddedtotheupperandlowerhalvesofthesrc2operand.Thevaluesinsrc1andsrc2aretreatedassigned,packed16-bitdataandtheresultsarewritteninsigned,packed16-bitformatintodst.
ADD4
ADD4(.unit)src1,src2,dst
.unit=.L1or.L2
Performs2s-complementadditionbetweenpacked8-bitquantities.Thevaluesinsrc1andsrc2aretreatedaspacked8-bitdataandtheresultsarewrittenintodstinapacked8-bitformat.
AND
(.unit)src1,src2,dst
.unit=.L1,.L2,.S1,.S2,.D1,.D2
PerformsabitwiseANDoperationbetweensrc1andsrc2.Theresultisplacedindst.Thescst5operandsaresignextendedto32bits.
ANDN
ANDN(.unit)src1,src2,dst
.unit=.L1,.L2,S1,.S2,.D1,
.D2
PerformsabitwiselogicalANDoperationbetweensrc1andthebitwiselogicalinverseofsrc2.Theresultisplacedindst.
AVG2
AVG2(.unit)src1,src2,dst
.unit=.M1or.M2
Performsanaveragingoperationonpacked16-bitdata.Foreachpairofsigned16-bitvaluesfoundinsrc1andsrc2,AVG2calculatestheaverageofthetwovaluesandreturnsasigned16-bitquantityinthecorrespondingpositioninthedst.
AVGU4
AVGU4(.unit)src1,src2,dst
.unit=.M1or.M2
Performsanaveragingoperationonpacked8-bitdata.Thevaluesinsrc1andsrc2aretreatedasunsigned,packed8-bitdataandtheresultsarewritteninunsigned,packed8-bitformat.Foreachunsigned,packed8-bitvaluefoundinsrc1andsrc2,AVGU4calculatestheaverageofthetwovaluesandreturnsanunsigned,8-bitquantityinthecorrespondingpositionsinthedst.
Bdisplacement
Bdisplacement(.unit)label
.unit=.S1or.S2
A21-bitsignedconstant,cst21,isshiftedleftby2bitsandisaddedtotheaddressofthefirstinstructionofthefetchpacketthatcontainsthebranchinstruction.Theresultisplacedintheprogramfetchcounter(PFC).Theassembler/linkerautomaticallycomputesthecorrectvalueforcst21bythefollowingformula:
cst21=(label-PCE1)>>2Iftwobranchesareinthesameexecutepacketandbotharetaken,behaviorisundefined.
Bregister
Bregister(.unit)src2
.unit=.S2
src2isplacedintheprogramfetchcounter(PFC).
BIRP
BIRP(.unit)IRP
.unit=.S2
IRPisplacedintheprogramfetchcounter(PFC).ThisinstructionalsomovesthePGIEbitvaluetotheGIEbit.ThePGIEbitisunchanged.
BNRP
BNRP(.unit)NRP
.unit=.S2
NRPisplacedintheprogramfetchcounter(PFC).ThisinstructionalsosetstheNMIEbit.ThePGIEbitisunchanged.
BDEC
BDEC(.unit)src,dst
.unit=.S1or.S2
Ifthepredicationanddecrementregister(dst)ispositive(greaterthanorequalto0),theBDECinstructionperformsarelativebranchanddecrementsdstby1.Theinstructionperformstherelativebranchusinga10-bitsignedconstant,scst10,insrc.Theconstantisshifted2bitstotheleft,thenaddedtotheaddressofthefirstinstructionofthefetchpacketthatcontainstheBDECinstruction(PCE1).Theresultisplacedintheprogramfetchcounter(PFC).
BITC4
BITC4(.unit)src2,dst
.unit=.M1or.M2
Performsabit-countoperationon8-bitquantities.Thevalueinsrc2istreatedaspacked8-bitdata,andtheresultiswritteninpacked8-bitformat.Foreachofthe8-bitquantitiesinsrc2,thecountofthenumberof1bitsinthatvalueiswrittentothecorrespondingpositionindst.
BITR
BITR(.unit)src2,dst
.unit=.M1or.M2
Implementsabit-reversalfunctionthatreversestheorderofbitsina32-bitword.Thismeansthatbit0ofthesourcebecomesbit31oftheresult,bit1ofthesourcebecomesbit30oftheresult,bit2becomesbit29,andsoon.
BNOPdisplace
BNOPdisplace(.unit)src2,src1
.unit=.S1or.S2
TheconstantdisplacementformoftheBNOPinstructionperformsarelativebranchwithNOPinstructions.Theinstructionperformstherelativebranchusingthe12-bitsignedconstantspecifiedbysrc2.
BNOPregister
BNOPregister(.unit)src2,src1
.unit=.S2
TheregisterformoftheBNOPinstructionperformsanabsolutebranchwithNOPinstructions.Theregisterspecifiedinsrc2isplacedintheprogramfetchcounter(PFC).
BPOS
BPOS(.unit)src,dst
.unit=.S1or.S2
Ifthepredicationregister(dst)ispositive(greaterthanorequalto0),theBPOSinstructionperformsarelativebranch.Ifdstisnegative,theBPOSinstructiontakesnootheraction.
CLR
CLR(.unit)src2,csta,cstb,dst
.unit=.S1or.S2
Forcstb>csta,thefieldinsrc2asspecifiedbycstatocstbisclearedtoall0sindst.Thecstaandcstboperandsmaybespecifiedasconstantsorinthe10LSBsofthesrc1register,withcstbbeingbits0-4(src14.0)andcstabeingbits5-9(src19..5).cstaistheLSBofthefieldandcstbistheMSBofthefield.Inotherwords,cstaandcstbrepresentthebeginningandendingbits,respectively,ofthefieldtobeclearedtoall0sindst.TheLSBlocationofsrc2isbit0andtheMSBlocationofsrc2isbit31.
CMPEQ
CMPEQ(.unit)src1,src2,dst
.unit=.L1or.L2
Comparessrc1tosrc2.Ifsrc1equalssrc2,then1iswrittentodst;otherwise,0iswrittentodst.
CMPEQ2
CMPEQ2(.unit)src1,src2,dst
.unit=.S1or.S2
Performsequalitycomparisonsonpacked16-bitdata.Each16-bitvalueinsrc1iscomparedagainstthecorresponding16-bitvalueinsrc2,returningeithera1ifequalora0ifnotequal.Theequalityresultsarepackedintothetwoleast-significantbitsofdst.Theresultforthelowerpairofvaluesisplacedinbit0,andtheresultsfortheupperpairofvaluesareplacedinbit1.Theremainingbitsofdstareclearedto0.
CMPEQ4
CMPEQ4(.unit)src1,src2,dst
.unit=.S1or.S2
Performsequalitycomparisonsonpacked8-bitdata.Each8-bitvalueinsrc1iscomparedagainstthecorresponding8-bitvalueinsrc2,returningeithera1ifequalora0ifnotequal.Theequalitycomparisonresultsarepackedintothefourleast-significantbitsofdst.
CMPGT
CMPGT(.unit)src1,src2,dst
.unit=.L1or.L2
Performsasignedcomparisonofsrc1tosrc2.Ifsrc1isgreaterthansrc2,thena1iswrittentodst;otherwise,a0iswrittentodst.
CMPGT2
CMPGT2(.unit)src1,src2,dst
.unit=.S1or.S2
Performscomparisonsforgreaterthanvaluesonsigned,packed16-bitdata.Eachsigned16-bitvalueinsrc1iscomparedagainstthecorrespondingsigned16-bitvalueinsrc2,returninga1ifsrc1isgreaterthansrc2orreturninga0ifitisnotgreater.Thecomparisonresultsarepackedintothetwoleast-significantbitsofdst.Theresultforthelowerpairofvaluesisplacedinbit0,andtheresultsfortheupperpairofvaluesareplacedinbit1.Theremainingbitsofdstareclearedto0.
CMPGTU
CMPGTU(.unit)src1,src2,dst
.unit=.L1or.L2
Performsanunsignedcomparisonofsrc1tosrc2.Ifsrc1isgreaterthansrc2,thena1iswrittentodst;otherwise,a0iswrittentodst.OnlythefourLSBsarevalidinthe5-bitdstfieldwhentheucst4operandisused.IftheMSBofthedstfieldisnonzero,theresultisinvalid.
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 附录C 64x 汇编指令 附录 64 汇编 指令