I wonder what makes AT&T assembly syntax "objectively crap".
You need to explicitly specify what the parameter sizes and types are. Plus, the parameters are backwards compared to Intel syntax: Intel: mov eax, 5 AT&T: movl $5, %eax In basically every C-like programming language, you assign 5 to eax with `eax=5` not `5=eax`. I can also tell that I'm working with the `long` variant of `mov` just by looking at the types involved. Intel's syntax for memory access seems more natural…
Rewrite Linux Kernel in Rust?
11–20 of 133 posts
Re: Rewrite Linux Kernel in Rust?
#12I wonder what makes AT&T assembly syntax "objectively crap".
Re: Rewrite Linux Kernel in Rust?
#13I wonder what makes AT&T assembly syntax "objectively crap".
You need to explicitly specify what the parameter sizes and types are. Plus, the parameters are backwards compared to Intel syntax: Intel: mov eax, 5 AT&T: movl $5, %eax In basically every C-like programming language, you assign 5 to eax with `eax=5` not `5=eax`. I can also tell that I'm working with the `long` variant of `mov` just by looking at the types involved. Intel's syntax for memory access seems more natural…
Re: Rewrite Linux Kernel in Rust?
#14Earlier quoted context omitted.
You need to explicitly specify what the parameter sizes and types are. Plus, the parameters are backwards compared to Intel syntax: Intel: mov eax, 5 AT&T: movl $5, %eax In basically every C-like programming language, you assign 5 to eax with `eax=5` not `5=eax`. I can also tell that I'm working with the `long` variant of `mov` just by looking at the types involved. Intel's syntax for memory access seems more natural…
Interestingly, in the language you actually wrote that complaint in : > you assign 5 to eax AT&T speaks English, basically. We move A to B. Destination goes last. Both seem sane enough. And in fact both get really balled up when you have three and four-argument instructions.
Re: Rewrite Linux Kernel in Rust?
#15Re: Rewrite Linux Kernel in Rust?
#16I wonder what makes AT&T assembly syntax "objectively crap".
Re: Rewrite Linux Kernel in Rust?
#17Earlier quoted context omitted.
Interestingly, in the language you actually wrote that complaint in : > you assign 5 to eax AT&T speaks English, basically. We move A to B. Destination goes last. Both seem sane enough. And in fact both get really balled up when you have three and four-argument instructions.
I'll grant that, but it's a programming language, so I kind of expect it to follow the order assignment does when I write in C++, C#, etc.
[1] Pause while the peanut gallery points out that in fact there are like ninety six different instructions in x86 called some variant of "MOV". Yeah, yeah, we know.
Re: Rewrite Linux Kernel in Rust?
#18Let's see what Linus thinks about this.
Re: Rewrite Linux Kernel in Rust?
#19Re: Rewrite Linux Kernel in Rust?
#20Now a kernel for a new OS, that'd be something.