Question: Why does my function call fail in a branch ?

Answer: The branch instructions

BR
BRD
CALL
RPTB
RPTBD
LAJ
Bcond
BcondAF
BcondAT
BcondD
CALLcond
DBcond
DBcondD
LAJcond
LATcond
RETIcond
RETIcondD
RETScond
etc

have either 16 or 24-bit displacement fields (+/- 32K or +/- 8M words, respectively). In most cases, the compiler uses the conditional branches with 16-bit offset. One way to fix this is to use a function pointer to call the function. This will use the register addressing mode rather than the PC-displacement addressing mode.


Device: TMS320C3x
Category: TI Tools Information
Detail: Code Generation Tools
Detail2: Compiler
Title: Function call fail in a branch
Source: Case from TMS320 Hotline
Date: 4/28/98
GenId: a2

© Copyright 1998 Texas Instruments Incorporated. All rights reserved.
Trademarks, Important Notice!