- 注册时间
- 2010-10-22
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 2292
- 在线时间
- 小时
|
发表于 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 [rsp+38h+var_10]
- or [rsp+38h+var_10], 8040h
- ldmxcsr [rsp+38h+var_10]
- mov rax, 7FFF7FFF7FFF7FFFh
- mov [rsp+38h+var_18], rax
- lea rcx, aI64x ; "%I64x\n"
- mov rdx, [rsp+38h+var_18]
- call printf
- xor eax, eax
- add rsp, 38h
- retn
- main endp
复制代码 |
评分
-
查看全部评分
|