3 ms·
I'd agree that there is no strong inherent benefit to either ordering, except that it would be good not to needlessly violate expectations about mathematical op
by gergo_barany 2y ago
I'd agree that there is no strong inherent benefit to either ordering, except that it would be good not to needlessly violate expectations about mathematical operations. AT&T also permutes the order of operands of comparisons, which is just bizarre: https://gcc.godbolt.org/z/h6EcP5Yv9 https://gcc.godbolt.org/z/h6EcP5Yv9
"Compare A and B and do X if result is 'less than'" should never mean "do X if B is less than A".
Anyway, the most important consideration for me is that standard documentation uses Intel operand order. Intel's manuals are hard enough to read, I wouldn't want to additionally permute operands in my head.
- kstenerud 2y agoCertainly, I'm not defending AT&T in any way, shape, or form. I think it's ugly and confusing as hell. My only point is that argument ordering is not something to worry about, and every argument I've heard one way or the other has been weak at best.
- kragen 2y agothe comparison operand ordering problem is a legitimate problem that i keep having even after having written thousands of lines of assembly in at&t syntax. i hope it goes away after i get to tens of thousands...