Annotation of ntddk/src/video/displays/s3/equad.cxx, revision 1.1

1.1     ! root        1: /******************************Module*Header*******************************\
        !             2: * Module Name: equad.cxx                                                   *
        !             3: *                                                                          *
        !             4: * Created: 26-Apr-1991 13:01:08                                            *
        !             5: * Author: Kirk Olynyk [kirko]                                              *
        !             6: *                                                                          *
        !             7: * Copyright (c) 1991 Microsoft Corporation                                 *
        !             8: *                                                                          *
        !             9: \**************************************************************************/
        !            10: 
        !            11: #include "stddef.h"
        !            12: #include "windows.h"
        !            13: #include "debug.h"
        !            14: #include "equad.hxx"
        !            15: 
        !            16: /******************************Member*Function*****************************\
        !            17: * VOID EUQUAD::vMulInit(ULONG ul1,ULONG ul2)
        !            18: *
        !            19: * History:
        !            20: *  Mon 21-Oct-1991 11:37:26 by Kirk Olynyk [kirko]
        !            21: * Wrote it.
        !            22: \**************************************************************************/
        !            23: 
        !            24: VOID EUQUAD::vMulInit(ULONG ul1,ULONG ul2)
        !            25: {
        !            26: 
        !            27: // Use the Rtl signed multiply routine for the lowest 31-bits of each
        !            28: // argument
        !            29: 
        !            30:     *(LARGE_INTEGER*) this =
        !            31:             RtlEnlargedIntegerMultiply(
        !            32:                 (LONG) ul1 & ~0x80000000,
        !            33:                 (LONG) ul2 & ~0x80000000
        !            34:                 );
        !            35: 
        !            36:     EUQUAD euqT;
        !            37:     euqT.LowPart = 0;
        !            38:     euqT.HighPart = 0;
        !            39: 
        !            40:     euqT.LowPart += (ul1 & 0x80000000) ? ul2: 0;
        !            41:     euqT.LowPart += (ul2 & 0x80000000) ? ul1: 0;
        !            42:     euqT.LowPart += (ul1 & ul2 & 0x80000000) ? 0x80000000 : 0;
        !            43: 
        !            44:     if (!euqT.bZero())
        !            45:     {
        !            46:         euqT <<= 31;
        !            47:         *this += *(EUQUAD*) &euqT;
        !            48:     }
        !            49: }
        !            50: 
        !            51: 

unix.superglobalmegacorp.com

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