Ignore:
Timestamp:
Jun 25, 1999, 3:59:02 PM (26 years ago)
Author:
phaller
Message:

Add: new runtime functions in NTDLL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/NTDLL/rtl.cpp

    r97 r188  
    1 /* $Id: rtl.cpp,v 1.2 1999-06-10 17:06:46 phaller Exp $ */
     1/* $Id: rtl.cpp,v 1.3 1999-06-25 13:59:02 phaller Exp $ */
    22
    33/*
     
    528528
    529529/******************************************************************************
     530 * RtlEnlargedIntegerMultiply [NTDLL.341]
     531 * Note: This even works, since gcc returns 64bit values in eax/edx just like
     532 * the caller expects. However... The relay code won't grok this I think.
     533 *
     534 * @@@PH: Parameters are unknown
     535 */
     536/* longlong in VAC++ ? */
     537
     538INT WINAPI RtlEnlargedIntegerMultiply(INT factor1,
     539                                      INT factor2)
     540{
     541  dprintf(("NTDLL: RtlEnlargedIntegerMultiply(%08xh,%08xh) not implemented.\n",
     542           factor1,
     543           factor2));
     544
     545  return factor1 * factor2;
     546}
     547
     548
     549/******************************************************************************
    530550 * RtlExtendedLargeIntegerDivide [NTDLL.359]
    531551 */
     
    551571
    552572/******************************************************************************
    553  * RtlExtendedLargeIntegerMultiply [NTDLL.359]
     573 * RtlExtendedLargeIntegerMultiply [NTDLL.358]
    554574 * Note: This even works, since gcc returns 64bit values in eax/edx just like
    555575 * the caller expects. However... The relay code won't grok this I think.
    556576 */
    557 #if 0
    558577/* longlong in VAC++ ? */
    559 long long WINAPI RtlExtendedIntegerMultiply(LARGE_INTEGER factor1,
    560                                             INT factor2)
    561 {
    562 #if SIZEOF_LONG_LONG==8
    563    return (*(long long*)&factor1) * factor2;
    564 #else
    565   dprintf(("NTDLL: RtlExtendedLargeIntegerMultiply(%08xh,%08xh) not implemented.\n",
     578
     579LARGE_INTEGER WINAPI RtlExtendedIntegerMultiply(LARGE_INTEGER factor1,
     580                                                INT           factor2)
     581{
     582  LARGE_INTEGER li;
     583
     584  dprintf(("NTDLL: RtlExtendedIntegerMultiply(%08xh,%08xh) not implemented.\n",
    566585           factor1,
    567586           factor2));
    568587
    569   return 0;
    570 #endif
    571 }
    572 #endif
     588  li.LowPart  = factor1.LowPart * factor2;
     589  li.HighPart = factor1.HighPart * factor2;
     590  // note: overflow from LowPart To HighPart NOT handled !
     591
     592  return li;
     593}
     594
     595
    573596/******************************************************************************
    574597 *  RtlFormatCurrentUserKeyPath             [NTDLL.371]
Note: See TracChangeset for help on using the changeset viewer.