mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[FREELDR/x64] Merge x64 and x86 versions, to fix compilation with GAS x64
Upper bits of rcx are already checked to be 0. So, we can only take care of lower bits. This also generates smaller code.
This commit is contained in:
parent
2a6d8465d6
commit
ec7d874c18
1 changed files with 5 additions and 5 deletions
|
@ -119,12 +119,12 @@ reloc_down:
|
|||
#if 0
|
||||
rep movsb
|
||||
#else
|
||||
mov rdx, rcx // Copy the total number of bytes in EDX
|
||||
and rdx, HEX(0FFFFFFFC) // Number of bytes we copy using DWORDs
|
||||
xor rdx, rcx // Number of remaining bytes to copy after the DWORDs
|
||||
shr rcx, 2 // Count number of DWORDs
|
||||
mov edx, ecx // Copy the total number of bytes in EDX
|
||||
and edx, HEX(0FFFFFFFC) // Number of bytes we copy using DWORDs
|
||||
xor edx, ecx // Number of remaining bytes to copy after the DWORDs
|
||||
shr ecx, 2 // Count number of DWORDs
|
||||
rep movsd // Move DWORDs
|
||||
mov rcx, rdx // Count number of remaining bytes
|
||||
mov ecx, edx // Count number of remaining bytes
|
||||
rep movsb // Move bytes
|
||||
#endif
|
||||
jmp after_reloc
|
||||
|
|
Loading…
Reference in a new issue