AnsweredAssumed Answered

BSR and JSR optimisations ?

Question asked by Mark Tverskoy on May 12, 2006
Latest reply on May 15, 2006 by CrasyCat
Hi,
Do you have any clue why this piece of code compiled as is:
 
#pragma NO_ENTRY
#pragma NO_EXIT
#pragma NO_FRAME
#pragma NO_RETURN
#pragma OPTION ADD "-OnB=b"

static void ISRHandler(void)
{
}
 
#pragma NO_ENTRY
#pragma NO_EXIT
#pragma NO_FRAME
#pragma NO_RETURN
#pragma OPTION ADD "-OnB=b"

static void rejump_func(void)
{
__asm bsr    ISRHandler    ; /* vector 63 */
}
 
Meaning that relative addressing is used as desired.
And in case the ISRHandler goes below rejump_func the "bsr" is changed to "jsr" ?? I need to have my ISRHandler allocated below the rejump table and I need to use relative branch instructions!
 
Mark

Outcomes