Packing of structure fields and whole structs

2006-12-05 Thread Phil Endecott
Dear GCC Experts, I am trying to understand the subtleties of __attribute__((packed)). I have some code that works on x86, where unaligned accesses work, but fails on ARM where they do not. As far as I can see, if I declare a struct with the packed attribute applied to the whole struct, lik

%dil in x86 inline asm

2005-05-25 Thread Phil Endecott
Dear GCC experts, I'm having trouble compiling code that uses the following macro from the Apache Portable Runtime: #define apr_atomic_cas(mem,with,cmp) \ ({ apr_atomic_t prev; \ asm volatile ("lock; cmpxchgl %1, %2" \ : "=a" (prev) \ : "r" (wit