This is the mail archive of the
mailing list for the GCC project.
arm inline assembly 4.8 vs. 4.9
- From: Gene Smith <gds at chartertn dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 10 Mar 2015 18:40:22 -0400
- Subject: arm inline assembly 4.8 vs. 4.9
- Authentication-results: sourceware.org; auth=none
The following inline assembly works as I want with gcc 4.8.3 and
produces the result shown:
"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?