Gerd Hoffmann wrote:
>
>>> +static uint32_t div_frac(uint32_t dividend, uint32_t divisor)
>>> +{
>>> +    uint32_t quotient, remainder;
>>> +
>>> +    __asm__ ( "divl %4"
>>> +          : "=a" (quotient), "=d" (remainder)
>>> +          : "0" (0), "1" (dividend), "r" (divisor) );
>>> +    return quotient;   
>>> +}
>>>   
>>>       
>> do_div()?
>>     
>
> No, this one does something else.  Already tried to get rid of that one
> before ;)
>
>   

There is actually a simpler way of coding this:


   return  dividend / divisor;

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization

Reply via email to