Computer Chess Club Archives


Search

Terms

Messages

Subject: shift right 32 bit assembly

Author: giuseppe

Date: 09:39:23 11/01/05


hi,

in viusal c++ the the number of opcode of solution 1 is major of code of
solution 2
why sample 1 is more fast of solution 2 ?


unsigned buf
U64 n64


****** solution 1 *******
buf = n64 >> 32;
//the disassembly generated code is this:
//0040AB6A   mov         ecx,20h
//0040AB6F   mov         eax,dword ptr [ebp-8]
//0040AB72   mov         edx,dword ptr [ebp-4]
//0040AB75   call        _aullshr (0040f2c0)
//0040AB7A   mov         dword ptr [ebp-0Ch],eax
**************************


****** solution 2 ********
__asm{
 mov eax, dword ptr n64+04h
 mov buf, eax
}
**************************





This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.