我们为嵌入式 PowerPC 架构开发代码。
我们的编译器支持称为 asm 宏的东西。
这里是手册的摘录:
asm Macro Syntax
An asm macro definition looks much like a function definition, including a return type and parameter list, and function body.
The syntax is:
asm [volatile] [return-type] macro-name ( [ parameter-list ] ) { % storage-mode-list (must start in column 1) ! register-list (“!” must be first non-whitespace) asm-code } (must start in column 1
这是标准的C吗?我的编译器没有在他的手册中将此列为扩展。
第一次回答后的澄清:
我知道带有 { }
的部分不是由标准 C 定义的。我的意思是像在 asm
之后和结束 之前构造的函数)
.
最佳答案
不,它不是标准的 C。任何特定于体系结构的东西,如汇编代码,根据定义都将成为特定于实现的扩展。
关于c - "asm Macro"是标准 C 的一部分吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28589106/