Is there no inline assembly x86_64 addressing syntax

Hello,

in university, I am currently learning Intel Assembly and find it fun but I wish we had more exercises, so naturally I thought I might take the exercises we had and try to rewrite it in Zig inline asm.

My question: Is there by any chance comprehensive documentation? Is there movl -8(%ebp, %edx, 4), %eax # Full example: load *(ebp + (edx * 4) - 8) into eax (this is from x86 Assembly/GNU assembly syntax - Wikibooks, open books for an open world) syntax? Does this apparent subset of at&t syntax have a name or is it Zig specific?

I have already been successful in converting my work but I’m just interested.

The AT&T assembly syntax for in-lining in other languages is gnu inline assembly
The zig specifics are documented: zig inline assembly
Note this accepted proposal: Proposal: Eliminate global assembly from the language · Issue #24077 · ziglang/zig · GitHub (see: zig Global assembly definition)

2 Likes

I just searched for gnu inline in the docs and couldn’t find anything, I think that should it should be noted what type of syntax it is. My converting from intel to gnu inline was a complete guessing game and stdlib searching, simply because I didnt know what dialect I was writing.

In regards to that proposal: This doesnt affect classic

_ = asm volatile (
    ...);

syntax inside a function, does it?