News for hackers. Stuff that matters.
Re:Rewrite Linux Kernel in Rust? by ajross on Saturday June 03, 2017 @10:27PM (#14479599)
AT&T assembly style significantly predates C++ (and C# by like two decades), and co-evolved with C. And strictly this isn't an assignment, anyway. Assignment is an abstract operation in a programming language. This is a machine instruction[1] for a physical machine, which does exactly one thing.

[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? by i336_ on Sunday June 04, 2017 @04:52AM (#14480452)
What.

When did `mov` get 96 different instructions?

Re:Rewrite Linux Kernel in Rust? by chipaca on Sunday June 04, 2017 @06:01AM (#14480616)
I think it's just a bit of hyperbole. I don't know enough of this to know whether http://c9x.me/x86/html/file_module_x86_id_176.html is complete, but it gives you a sense of it all. (also https://www.cl.cam.ac.uk/~sd601/papers/mov.pdf if you haven't seen it)
Re:Rewrite Linux Kernel in Rust? by i336_ on Sunday June 04, 2017 @06:12AM (#14480650)
Huh, interesting.

Apparently there are 35 rows in the table at http://www.felixcloutier.com/x86/MOV.html (according to Chrome and `$0.childElementCount`). I only discovered gcc.godbolt.org links to documentation via context menu just the other day!

Regarding the PDF... ouch. Wonder if any executable obfuscators have tried that approach :P (and I also wonder what sort of overhead it has.)