Annotation of coherent/b/kernel/emulator/div_small.S, revision 1.1.1.1

1.1       root        1:        .file   "div_small.S"
                      2: /*---------------------------------------------------------------------------+
                      3:  |  div_small.S                                                              |
                      4:  |                                                                           |
                      5:  | Divide a 64 bit integer by a 32 bit integer & return remainder.           |
                      6:  |                                                                           |
                      7:  | Copyright (C) 1992    W. Metzenthen, 22 Parker St, Ormond, Vic 3163,      |
                      8:  |                       Australia.  E-mail [email protected]    |
                      9:  |                                                                           |
                     10:  |                                                                           |
                     11:  +---------------------------------------------------------------------------*/
                     12: 
                     13: /*---------------------------------------------------------------------------+
                     14:  |    unsigned long div_small(unsigned long long *x, unsigned long y)        |
                     15:  +---------------------------------------------------------------------------*/
                     16: 
                     17: #include "fpu_asm.h"
                     18: 
                     19: .text
                     20:        .align 2,144
                     21: 
                     22: .globl div_small
                     23: 
                     24: div_small:
                     25:        pushl   %ebp
                     26:        movl    %esp,%ebp
                     27: 
                     28:        pushl   %esi
                     29: 
                     30:        movl    PARAM1,%esi     /* pointer to num */
                     31:        movl    PARAM2,%ecx     /* The denominator */
                     32: 
                     33:        movl    4(%esi),%eax    /* Get the current num msw */
                     34:        xorl    %edx,%edx
                     35:        divl    %ecx
                     36: 
                     37:        movl    %eax,4(%esi)
                     38: 
                     39:        movl    (%esi),%eax     /* Get the num lsw */
                     40:        divl    %ecx
                     41: 
                     42:        movl    %eax,(%esi)
                     43: 
                     44:        movl    %edx,%eax       /* Return the remainder in eax */
                     45: 
                     46:        popl    %esi
                     47: 
                     48:        leave
                     49:        ret
                     50: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.