On Mon, Mar 24, 2008 at 8:28 AM, Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx> wrote: > Dave, > > I've switched over to gcc-4_3-branch to do some hppa-linux libc > testing. While the gcc testsuite looks OK, modulo the builtin-math > failures (and a completely failed libgomp testsuite, likely an > environment setup issue), I can no longer build glibc. > > When compiling the first function which uses the atomic.h macro, I get > the following failure in reload: > ~~~ > ../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h:220: error: > can't find a register in class 'R1_REGS' while reloading 'asm > ' > dcigettext.c:1106: error: can't find a register in class 'R1_REGS' > while reloading 'asm' > dcigettext.c:1168: error: can't find a register in class 'R1_REGS' > while reloading 'asm' > dcigettext.c:1198: error: can't find a register in class 'R1_REGS' > while reloading 'asm' > ../ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h:220: error: > 'asm' operand has impossible constraints > ~~~ I looked up how constrain_operands() works, and I realized that the correct solution is probably this: 1) Remove "memory" from clobber. 2) Change the output constraint "=m" (*mem) to "+m" (*mem) to express that the memory may be written to by the CAS operation. This is a tighter constraint than before, but it is no longer ambiguous. Previously we said we clobbered memory, but yet specified some as read-only. I was also worried about "*mem" as an output, and "mem" as a register input. You need to treat these mem/pointer pairs with care. This change to asm seems to have fixed the build failure. Yay. Cheers, Carlos. -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html