开发者

Using ASM when compiling x64 C++ with MSVC10

Due to MSVC10 not allowing the use of inline ASM instructions when targeting x64 architecture, I'm looking for any ways to get around such restrictions. I have learned from googling that writing and compiling separate ASM modules then linking against them and calling them from C++ is one way, however I have no idea how I would do this. Are there any other ways, short of u开发者_高级运维sing the compiler intrinsics? Or how does one go about writing/compiling/linking against separate ASM modules in VS2010?


You can use a separate assembler program which will compile complete assembler source files into object files. So long as you follow the correct calling conventions you can provide prototypes for the functions for use in C++ link the C++ and ASM generated object files together.

I use yasm . It uses intel syntax, supports x64 windows and VS2010 integration. It has useful macro and include features. I must confess that I haven't had to use it since VS2008 when integration worked a bit differently, but it is supposed to work well with VS2010.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜