127: int a = 2815;
00007FF78B5126EE mov dword ptr [a],0AFFh
128:
129: short c = static_cast<char>(a);
00007FF78B5126F5 movsx ax,byte ptr [a]
00007FF78B5126FA mov word ptr [c],ax
在我的环境中,anint
需要 4 个字节,而 short 需要 2,所以在movsx
指令中,为什么有一个字节而不是一个字?希望可以有人帮帮我!