explicit RET (return value goes in EAX)
This commit is contained in:
@@ -104,7 +104,7 @@ inline uint32_t ArchSwap32( uint32_t n )
|
||||
xchg al, ah
|
||||
ror eax, 16
|
||||
xchg al, ah
|
||||
mov n, eax
|
||||
ret
|
||||
};
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ inline uint32_t ArchSwap24( uint32_t n )
|
||||
ror eax, 16
|
||||
xchg al, ah
|
||||
ror eax, 8
|
||||
mov n, eax
|
||||
ret
|
||||
};
|
||||
}
|
||||
|
||||
@@ -125,9 +125,10 @@ inline uint16_t ArchSwap16( uint16_t n )
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov eax, 0 /* make sure high 16-bits are zero */
|
||||
mov ax, n
|
||||
xchg al, ah
|
||||
mov n, ax
|
||||
ret
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user