2 ms·
> That's pretty crazy assembly syntax... It looks like "AX" actually references "EAX" (in 32bit mode) and "RAX" (in 64bit mode), so neither Intel nor AT&T synta
by masklinn 10y ago
> That's pretty crazy assembly syntax... It looks like "AX" actually references "EAX" (in 32bit mode) and "RAX" (in 64bit mode), so neither Intel nor AT&T syntax.
Yeah it's plan9 assembly which is its own thing (just as plan9 "C" was its own thing): http://plan9.bell-labs.com/sys/doc/asm.html http://plan9.bell-labs.com/sys/doc/asm.html
- pmalynin 10y agoAX, is just the lower 16 bits of EAX, so all correct. This is GAS / AT&T syntax
- a1k0n 10y agoFrom the context it's obvious that 0x0 is right. AX must be 32 bits (or 64 bits) wide. https://github.com/golang/go/blob/fad2bbdc6a686a20174d2e73cf78f1659722bb39/src/runtime/sys_darwin_386.s https://github.com/golang/go/blob/fad2bbdc6a686a20174d2e73cf...
- LukeShu 10y agoIt's actually Go assembly, which (while being most similar to plan9 assembly) is also its own thing: https://golang.org/doc/asm https://golang.org/doc/asm