On Fri, 17 Apr 2020, Vineet Gupta via Libc-alpha wrote: > > My suggestion would be to define the > > macro (using do { ... } while (0)) to copy the argument to a temporary > > variable, and do the bit-set operation in C code on that temporary > > variable rather than as part of the asm. > > I can certainly do that if you think so. As a general principle, if an operation is something that can readily be expressed in ordinary C code (and setting a bit certainly is), it's best to express it in ordinary C code, and make the inline asm something as short as possible only doing what ordinary C code cannot, so giving the compiler freedom in how it generates the code (unless the compiler e.g. generates bad code for something performance-critical, but that shouldn't be an issue here). -- Joseph S. Myers joseph@xxxxxxxxxxxxxxxx _______________________________________________ linux-snps-arc mailing list linux-snps-arc@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/linux-snps-arc