www.ti.com
5.7.2ProgramModels
5.7.3RegisterConventions
5.7.4StatusRegisters
TMS320C28xRulesandGuidelines
Onlylargememorymodelissupportedfortheprogrammemory.Sonospecialprogrammemory
requirementsareneededforthisprocessor.Justtoreemphasizethepoint,alltheprogramcodemustbe
completelyrelocatableandmustnotnecessarilyrequireplacementinon-chipmemory.
ThissectiondescribestherulesandguidelinesthatapplytotheuseoftheTMS320C28xon-chip
registers.Notethatanyregisterthatisnotdescribedheremustnotbeaccessedbyanalgorithm;e.g.,
IMR,IFR,andperipheralcontrolandstatusregister.Thetablebelowdescribesalltheregistersthatmay
beaccessedbyanalgorithm.
RegisterUseType
ALExpressions,argumentpassing,andreturns16-bitresultsfromfunctionsScratch(local)
AHExpressionsandargumentpassingScratch(local)
XAR0PointersandexpressionsScratch(local)
XAR1PointersandexpressionsPreserve(local)
XAR2Pointers,expressions,andframepointersPreserve(local)
XAR3PointersandexpressionsPreserve(local)
XAR4Pointers,expressions,argumentpassing,andreturns16-and22-bitScratch(local)
pointervaluesfromfunctions
XAR5Pointers,expressions,andargumentsScratch(local)
XAR6PointersandexpressionsScratch(local)
XAR7Pointers,expressions,indirectcalls,andbranchesScratch(local)
SPStackpointerPreserve(local)
TMultiplyandshiftexpressionsScratch(local)
TLMultiplyandshiftexpressionsScratch(local)
PLMultiplyexpressionsandTempvariablesScratch(local)
PHMultiplyexpressionsandTempvariablesScratch(local)
DPDatapagepointerScratch(local)
TheTMS320C28xdevicecontainstwo-statusregisters:ST0andST1.Eachstatusregisterisfurther
dividedintoseveraldistinctfieldsthatmaybeaccessedseparatelyusingspecialinstructionslikeSETC,
CLRC,SPM,etc.
ST0FieldNameUseType
OVC/OVCUOverflowcounterScratch(local)
PMProduceshiftmodeInit(local)
VOverflowflagScratch(local)
NNegativeflagScratch(local)
ZZeroflagScratch(local)
CCarryflagScratch(local)
TCTest/ControlflagScratch(local)
OVMOverflowmodeScratch(local)
SXMSignextensionmodeScratch(local)
SPRU352G–June2005–RevisedFebruary2007DSP-SpecificGuidelines59
SubmitDocumentationFeedback