在Intel编译器中内联汇编 - FASM?

3
如果您希望在使用Intel编译器编译C++时编写内联汇编,您需要使用哪种汇编语法?是FASM/NASM还是MASM?这是否取决于您所在的操作系统(或者Intel编译器是否抽象了这种差异)?
1个回答

3
根据Intel,Intel® C++编译器支持Microsoft风格和GNU风格的内联汇编:

Inline Assembly

Microsoft* Style Inline Assembly

The Intel® C++ Compiler supports Microsoft-style inline assembly. See the Microsoft documentation for the proper syntax.

GNU*-like Style Inline Assembly (IA-32 architecture and Intel® 64 architecture only)

The Intel® C++ Compiler supports GNU-like style inline assembly. The syntax is as follows:

asm-keyword [ volatile-keyword ] ( asm-template [ asm-interface ] ) ;

NOTE

The Intel® C++ Compiler supports gcc-style inline ASM if the assembler code uses AT&T* System V/386 syntax.


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接