HI
I ams truggling with conversion of source part to comply with 64bit C++ compiler, unfortunatelly the part is written in assembler language. I get these errors during compiling:
error: Operand size mismatch in asm instruction mov.
error: Illegal gp reg in address (must be 64-bit) in asm instruction mov.
error: Illegal gp reg in address (must be 64-bit) in asm instruction mov.
The concerned part of 32bit source looks following:
Anybody can tell how can I adjust the instructions to comply 64bit compiler and retain it's functionality? Thanks.Code:static void local_swap32_block_(unsigned __int32 *start, unsigned __int32 len) { __asm { mov edx, start mov ecx, len test ecx, ecx loop1: jz done1 mov eax, dword ptr [edx] bswap eax mov [edx], eax add edx, 4 dec ecx jmp short loop1 done1: } } #endif
Btw. the function parameters are 32bit integers regardless on target machine so they should be handled as 32bit integers in this function also.




Reply With Quote