G-Spider 发表于 2011-4-27 21:44:31

20# gxqcn
VC不可以,Intel c++可以,试了一下.#include <stdio.h>
int main()
{
_int64 a;
_asm
{
mov rax,0x7fff7fff7fff7fff;
mov qword ptr a,rax
}
printf("%I64x\n",a);

return 0;
}执行情况:Intel Parallel Studio 2011
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Intel Parallel Composer 2011 (package 063)
Setting environment for using Microsoft Visual Studio 2005 x64 cross tools.

Intel(R) C++ Compiler XE for applications running on Intel(R) 64, Version 12.0.0
.063 Build 20100721
Copyright (C) 1985-2010 Intel Corporation.All rights reserved.

icc64.c
Microsoft (R) Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation.All rights reserved.

-out:icc64.exe
icc64.obj
请按任意键继续. . .
7fff7fff7fff7fff
请按任意键继续. . .静态片段:; int __cdecl main(int argc, const char **argv, const char **envp)
main proc near

var_18= qword ptr -18h
var_10= dword ptr -10h

sub   rsp, 38h
mov   ecx, 3
call    __intel_new_proc_init
stmxcsr
or      , 8040h
ldmxcsr
mov   rax, 7FFF7FFF7FFF7FFFh
mov   , rax
lea   rcx, aI64x      ; "%I64x\n"
mov   rdx,
call    printf
xor   eax, eax
add   rsp, 38h
retn
main endp

G-Spider 发表于 2011-12-14 14:13:29

12# liangbch

Mixing x86 with x64 code
页: 1 2 [3]
查看完整版本: 用vc2008开发64位程序,懂的请进