This kind of thing (from longlong.h) is never good news. Someone probably needs to figure out what the `arm3' version is doing and why it doesn't work on armv4. (It ought not to be using explicit hard registers either.)
/* SAM This does not work on arm4 */ #define umul_ppmm(xh, xl, a, b) \ __asm__ ("%@ Inlined umul_ppmm mov %|r0, %2, lsr #16 mov %|r2, %3, lsr #16 bic %|r1, %2, %|r0, lsl #16 bic %|r2, %3, %|r2, lsl #16 mul %1, %|r1, %|r2 mul %|r2, %|r0, %|r2 mul %|r1, %0, %|r1 mul %0, %|r0, %0 adds %|r1, %|r2, %|r1 addcs %0, %0, #65536 adds %1, %1, %|r1, lsl #16 adc %0, %0, %|r1, lsr #16" \ : "=&r" ((USItype)(xh)), \ "=r" ((USItype)(xl)) \ : "r" ((USItype)(a)), \ "r" ((USItype)(b)) \ : "r0", "r1", "r2") #elif __ARM_ARCH_4__ #define umul_ppmm(xh, xl, a, b) \ __asm__ ("%@ Inlined umul_ppmm umull %r1, %r0, %r2, %r3" \ : "=&r" ((USItype)(xh)), \ "=r" ((USItype)(xl)) \ : "r" ((USItype)(a)), \ "r" ((USItype)(b)) \ : "r0", "r1") #else #error Untested architecture #endif p.