[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 1/7] introduce time managment in xtf
On Mon, Apr 16, 2018 at 12:48:49PM +0200, Paul Semel wrote: > On 04/13/2018 02:05 PM, Roger Pau Monné wrote: > > > +static inline uint64_t scale_delta(uint64_t delta, uint32_t mul_frac, > > > int shift) > > > +{ > > > + uint64_t product; > > > +#ifdef __i386__ > > > + uint32_t tmp1, tmp2; > > > +#endif > > > + > > > + if ( shift < 0 ) > > > + delta >>= -shift; > > > + else > > > + delta <<= shift; > > > + > > > +#ifdef __i386__ > > > + __asm__ ( > > > + "mul %5 ; " > > > + "mov %4,%%eax ; " > > > + "mov %%edx,%4 ; " > > > + "mul %5 ; " > > > + "add %4,%%eax ; " > > > + "xor %5,%5 ; " > > > + "adc %5,%%edx ; " > > > + : "=A" (product), "=r" (tmp1), "=r" (tmp2) > > > + : "a" ((uint32_t)delta), "1" ((uint32_t)(delta >> 32)), "2" > > > (mul_frac) ); > > > > This line is too long. > > > > > +#else > > > + __asm__ ( > > > + "mul %%rdx ; shrd $32,%%rdx,%%rax" > > > + : "=a" (product) : "0" (delta), "d" ((uint64_t)mul_frac) ); > > > > Not sure whether you need to add a ': "d"' clobber here, since the d > > register is used but it's not in the list of output operands. > > > > > +#endif > > > + > > > + return product; > > > +} > > > + > > Actually, I'm not sure that I have to make that much changes to this > function, as @Andrew wanted to use another version of it as far as I recall. IMO if there are known issues with this function they need to be sorted out before committing. Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |