/*******************************************************************************
Copyright(c) 2000 - 2006 Analog Devices. All Rights Reserved.

By using this module you agree to the terms of the Analog Devices License
Agreement for DSP Software. 
********************************************************************************
Module Name     : udiv16.asm
Label Name      : __udiv16

Description     : Routine for division of 2 unsigned integer, numerator must be 
                  greater than denominator. Denominator reg value is unchanged.
                  output in 16.0 integer format

Performance     :
                Code size   : 16 Bytes.
*******************************************************************************/
.section    L1_code;
.global     __udiv16;
.align      8;
    
__udiv16:

    P0 = 15;
    R0 <<= 1;
    DIVS(R0,R1);
    
    LOOP .INT_DIV LC0 = P0;
    LOOP_BEGIN .INT_DIV;
    DIVQ(R0,R1);
    LOOP_END .INT_DIV;
    
    R0 = R0.L (Z);
    RTS;
__udiv16.end:    
