SPRAC71B February 2019 – October 2023
The following statements perform various types of relocations. The relocation type for each statement is shown in the comments.
These statements perform direct addressing relocations.
MOV DP, #var ; R_C28X_DP_HI10
MOV AL, @var ; R_C28X_ABSLO6
MOV AL, @@var ; R_C28X_ABSLO7
MOVW DP, #var ; R_C28X_DP_HI16
These statements perform relocations for branches:
LCR function ; R_C28X_ABS22
SB label ; R_C28X_PCREL8
B label ; R_C28X_PCREL16
These statements perform special relocations:
MOV AH, #HI(var) ; R_C28X_HI6
SUB loc16, #lab ; R_C28X_NEGWORD (on lab)
SUBB AH, #lab ; R_C28X_NEGBYTE
MOVB loc16, #lab, EQ ; R_C28X_ABS_HI (on lab)
This statement performs a special relocation using C2xLP compatibility addressing:
MPY #lab ; R_C28X_ABS13_SE16 ; sign extend 13->16 bits
This statement performs a special relocation using CLA relocation:
MI16TOF32 MR0, @lab ; R_CLA_ABS16