Feature Request: Add Intel/NASM Syntax Option for Inline Assembly
Tadeo The rocket builder via Gcc-help <[email protected]> Mon, 15 Dec 2025 17:42:17 -0500
| Newsgroups | gmane.comp.gcc.help |
|---|---|
| Message-ID | <CADU2DDLJvt_dOvpY9ZQ35junmKzzyZS7J3_w1WTy9BCPtg_OjQ@mail.gmail.com> |
Hello GCC Team, The inline assembly keyword (__asm__) currently uses AT&T syntax. However, many developers (including myself) are more familiar with Intel/NASM syntax, especially when developing operating systems and low-level code. Would it be possible to add support for Intel syntax in inline assembly? For example: - Keep the existing __asm__ keyword with AT&T syntax for compatibility - Add a new keyword like __asm_intel__ or __asmnasm__ for Intel/NASM syntax - Or add a syntax flag/attribute to switch between syntaxes This would greatly help OS developers who primarily use NASM for their .asm files and want consistent syntax when using inline assembly in C code. I'm currently developing CoolisOS (an x86-64 operating system) and this feature would make the codebase more maintainable. Thank you for considering this request!