We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
extern int table[] = { 1, 2, 3};int foo_c(int i) { return table[i]; }
__asm int foo_asm() { ldr r1, dlblulbl add r1, r1, pc ldr r0,[r1,r0,lsl #2] bx lr aligndlbl dcd __cpp(table) - ulbl - 8}
__asm int foo_asm_non_PI() { ldr r1, dlbl ldr r0,[r1,r0,lsl #2] bx lr aligndlbl dcd __cpp(table)}
__asm int foo_asm_non_PI2() { ldr r1, =__cpp(table) ldr r0,[r1,r0,lsl #2] bx lr}