• Eric Pouech's avatar
    ntdll: Fix export and calling convention of RtlUlonglongByteSwap(). · 495711c2
    Eric Pouech authored
    The RtlU*ByteSwap() family:
    - has FASTCALL calling convention
    - is only exported from ntdll and ntoskrnl.exe in 32bit mode
      (didn't check ARM though)
    
    Wine's support for RtlUlonglongByteSwap() doesn't follow these constraints.
    Note: in __fastcall, 64bit paramaters are passed on the stack, to
    RtlUlonglongByteSwap() calling convention acts as __stdcall.
    
    So:
    - fix ntdll.spec (resp. ntoskrnl.exe.spec) to only export
      (resp. forward) RtlUlonglongByteSwap for i386
    - always provide an inline implementation in winternl.h
    - reimplement ntdll.RtlUlonglongByteSwap() for i386 with
      __fastcall calling convention.
    - fix ntdll/tests/rtl.c to use correct calling convention.
    - add test in ntdll/tests/rtl.c for inlined version.
    
    Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53536Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
    495711c2
winternl.h 222 KB