Module: xenomai-head Branch: master Commit: 7062f230764e83909b1ed92a745270e3e793b701 URL: http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=7062f230764e83909b1ed92a745270e3e793b701
Author: Gilles Chanteperdrix <[email protected]> Date: Sun Jan 2 00:17:11 2011 +0100 arith: Fix compilation of x86_32 nodiv_llimd with gcc 4.5 --- include/asm-x86/arith_32.h | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/asm-x86/arith_32.h b/include/asm-x86/arith_32.h index 517d391..11c9564 100644 --- a/include/asm-x86/arith_32.h +++ b/include/asm-x86/arith_32.h @@ -65,14 +65,14 @@ __rthal_uldivrem(const unsigned long long ull, const unsigned long d) /* Fast long long division: when the quotient and remainder fit on 32 bits. */ static inline unsigned long __rthal_i386_uldivrem(unsigned long long ull, - const unsigned d, - unsigned long *const rp) + const unsigned d, + unsigned long *const rp) { unsigned long q, r; ull = __rthal_uldivrem(ull, d); __asm__ ( "": "=d"(r), "=a"(q) : "A"(ull)); if(rp) - *rp = r; + *rp = r; return q; } #define rthal_uldivrem(ull, d, rp) __rthal_i386_uldivrem((ull),(d),(rp)) @@ -80,9 +80,9 @@ static inline unsigned long __rthal_i386_uldivrem(unsigned long long ull, /* Division of an unsigned 96 bits ((h << 32) + l) by an unsigned 32 bits. Building block for ulldiv. */ static inline unsigned long long __rthal_div96by32 (const unsigned long long h, - const unsigned long l, - const unsigned long d, - unsigned long *const rp) + const unsigned long l, + const unsigned long d, + unsigned long *const rp) { u_long rh; const u_long qh = rthal_uldivrem(h, d, &rh); @@ -96,8 +96,8 @@ static inline unsigned long long __rthal_div96by32 (const unsigned long long h, the compiler removes redundant calls. */ static inline unsigned long long __rthal_i386_ulldiv (const unsigned long long ull, - const unsigned d, - unsigned long *const rp) + const unsigned d, + unsigned long *const rp) { unsigned long h, l; __rthal_u64tou32(ull, h, l); @@ -140,12 +140,13 @@ __rthal_i386_ulldiv (const unsigned long long ull, static inline __attribute__((const)) unsigned long long __rthal_x86_nodiv_ullimd(const unsigned long long op, const unsigned long long frac, - unsigned integ) + unsigned rhs_integ) { register unsigned rl __asm__("ecx"); register unsigned rm __asm__("esi"); register unsigned rh __asm__("edi"); unsigned fracl, frach, opl, oph; + volatile unsigned integ = rhs_integ; register unsigned long long t; __rthal_u64tou32(op, oph, opl); @@ -179,7 +180,7 @@ __rthal_x86_nodiv_ullimd(const unsigned long long op, "mov %[oph], %%edx\n\t" "imul %[integ], %%edx\n\t" "add %[rh], %%edx\n\t" - : [rl]"=c"(rl), [rm]"=S"(rm), [rh]"=D"(rh), "=A"(t) + : [rl]"=&c"(rl), [rm]"=&S"(rm), [rh]"=&D"(rh), "=&A"(t) : [opl]"m"(opl), [oph]"m"(oph), [fracl]"m"(fracl), [frach]"m"(frach), [integ]"m"(integ) : "cc"); _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
