Some assembler code seems to be missing. If I compile (-O3) only the code snippet you showed in a simple program then I get the following:
[11] bp := @bf + XOFF - 13;
ldi r18,lo8(U_sPsTEST_AVR_ss_BF)
ldi r19,hi8(U_sPsTEST_AVR_ss_BF)
ldi r20,32
add r18,r20
adc r19,r1
subi r18,13
sbc r19,r1
# Var bp located in register r18
For this simple case the compiler optimized away the storage of
bp and it is located in two registers (since a pointer is 16 bits): r18 & r19.
bf is stored in SRAM (the linker still needs to resolve the symbol U_sPsTEST_AVR_ss_BF, this is assembler before it was linked by passing -al as option to the compiler).
Lines 2, 3 above loads the hi and lo bytes of the memory address of
bf into
bp.
Lines 4..6 adds XOF (32) to r18,r19 with carry
Lines 7,8 subtracts 13 from r18,r19 with borrow (if that is the term used?)
I guess the interesting bit is that
32 - 13 is not combined into a new constant,
19. This is because the compiler evaluates left to right. To help the compiler one can use parentheses so that the diference between two constants are pre-evaluated:
The resulting assembler:
# [11] bp := @bf + (XOFF - 13);
ldi r18,lo8(U_sPsTEST_AVR_ss_BF)
ldi r19,hi8(U_sPsTEST_AVR_ss_BF)
ldi r20,19
add r18,r20
adc r19,r1
# Var bp located in register r18