The Int64ShraMod32 function performs a right arithmetic shift operation on a signed 64-bit integer value. The function provides improved shifting code for right arithmetic shifts where the shift count is in the range 0 - 31.
LONGLONG Int64ShraMod32(
LONGLONG Value, |
// specifies signed 64-bit integer to shift right arithmetically |
DWORD ShiftCount |
// specifies a shift count in the range 0 - 31 |
); |
The return value is the signed 64-bit integer result of the right arithmetic shift operation.
The shift count is the number of bit positions that the value’s bits move.
In a right arithmetic shift operation on a signed value, the value’s bits move to the right, and vacated bits on the left side of the value are set to the value of the sign bit.
A compiler can generate optimal code for a right arithmetic shift operation when the shift count is a constant. However, if the shift count is a variable whose range of values is unknown, the compiler must assume the worst case, leading to non-optimal code: code that calls a subroutine, or code that is inline but branches. By restricting the shift count to the range 0 - 31, the Int64ShraMod32 function lets the compiler generate optimal or near-optimal code.
Please note that the Int64ShraMod32 function’s Value parameter and return value are 64-bit values, not LARGE_INTEGER structures.
Int64ShllMod32, Int64ShrlMod32
file: /Techref/os/win/api/win32/func/src/f49_16.htm, 2KB, , updated: 2000/4/7 11:19, local time: 2024/11/30 11:26,
3.16.82.208:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/techref/os/win/api/win32/func/src/f49_16.htm"> Int64ShraMod32</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.