The following inline assembly works as I want with gcc 4.8.3 and
produces the result shown:
__asm (
"ldr r0, =%[addrOfIoPorts]\n"
: /* no output */
: [addrOfIoPorts] "g" (&ioPorts) /* input */
: "r0"); /* clobber */
801b9e2: 4822 ldr r0, [pc, #136]
But when compiled with 4.9.3 the linker says "undefined reference to
`r3'. This is because the produced assembly becomes such that r3 looks
like a constant:
ldr r0, =r3
I have been unable to find a modification to the original code that
works with 4.9.3. Any ideas or suggestions?
Thanks,
-gene