This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

arm inline assembly 4.8 vs. 4.9


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]