I am suprised to discover that under MSVS2012 with x64 plateform as target under debug mode with optimization turn off, a long long initialization can’t be done in one instruction :
; long long l1 = 1;
mov DWORD PTR _l1$[ebp], 1
mov DWORD PTR _l1$[ebp+4], 0
As register are 8 bytes, I expected a instruction capable of doing it… is there one ?
Trying this in a quick console mode project that targets x64 and looking in the Disassembly window:
Same code when targeting x86:
Slam dunk, you are not actually looking at the x64 build of your program. Use Build + Configuration Manager to fix this.