On 11/26/2018 12:35 PM, Gabriel Ivăncescu wrote:
Just out of curiosity, what is wrong with the inline assembly here (and the other patches)? To me it looks easier to maintain and generates better code.
I know there's a reason, that's why I'm asking :-)
"Easier to maintain" may be subjective; I personally find the constraint mnemonics harder to read. In any case I doubt that performance should be a concern here.
The first such patch I sent was 0c216b8ca, it was motivated by clang generating references to %esp despite the use of stack instructions (and despite -fno-omit-frame-pointer). Alexandre prescribed avoiding inline assembly for all but the most simple functions, IIRC because constraints are generally trickier to get right.