APR_FORCE_ATOMIC_GENERIC setting in Mandrake 10.1
Dear Apache Experts, I'm the author of Anyterm, an Apache2 module and Javascript thing that creates a box on a web page that behaves like a shell using XmlHttpRequest. (http://chezphil.org/anyterm/) I've had a couple of reports from Mandrake 10.1 users who have got the following error while compiling: /home/bravo/tmp/ccqUjIBR.s: Assembler messages: /home/bravo/tmp/ccqUjIBR.s:30: Error: bad register name `%dil' My code uses apr_atomic_cas(). It seems that on my Debian system, apr-0/apr.h defines APR_FORCE_ATOMIC_GENERIC as 1, while on the systems that show the error it is defined as 0. Can someone explain what should be happening here? Under what circumstances should APR_FORCE_ATOMIC_GENERIC be set? My guess is that people who are distributing binary packages (eg Mandrake) should be forcing it to 1 with a configure option since they don't know the precise details of the machine on which it will run. Or, is it my responsibility to set it? Many thanks for any suggestions you can offer. I can try to provide more details if that would be useful but I have never seen the error happen first hand. Regards, Phil.
Re: APR_FORCE_ATOMIC_GENERIC setting in Mandrake 10.1
Phil Endecott wrote: I've had a couple of reports from Mandrake 10.1 users who have got the following error while compiling: /home/bravo/tmp/ccqUjIBR.s: Assembler messages: /home/bravo/tmp/ccqUjIBR.s:30: Error: bad register name `%dil' My code uses apr_atomic_cas(). I've been investigating this further, and I think that the problem is with the asm version of apr_atomic_cas that you use. It looks like you have the same code in the current trunk, in atomic.c, as in the released version's .h that I have: asm volatile (lock; cmpxchgl %1, %2 : =a (prev) : r (with), m (*(mem)), 0(cmp) : memory, cc); I've asked about this on the gcc mailing list and they confirm that r should be q. q is an x86-specific thing that indicates the subset of x86 / AMD64 registers that can be used with this instruction; using r you risk gcc choosing an inappropriate register. (I realise now that the APR list would be a better place to mention this - are the appropriate people also listening here?) Regards, Phil.
Re: APR_FORCE_ATOMIC_GENERIC setting in Mandrake 10.1
On 5/25/05, Phil Endecott [EMAIL PROTECTED] wrote: (I realise now that the APR list would be a better place to mention this - are the appropriate people also listening here?) some subset, but it would be better to start a new thread on [EMAIL PROTECTED] with your latest research