This actually is false. GCC does not know what resources the
instruction uses, therefore it cannot perform accurate instruction
scheduling.
Richard and I discussed at some time providing a way for inline
asms to give the instruction attributes.
An easier way is to provide a per-platform way to get at the
"weird" instructions a cpu has. This is precisely what GCC currently
provides in the form of __builtin_${CPU}_${WEIRD_INSN}(args...) type
interfaces. These give you what you want (complete control) yet
also let GCC schedule the thing accurately.
I know you think GCC is a pile of dogshit, in many ways I do too, but I
think it's just as important to point out the good parts where they
exist.
-- David S. Miller <davem@redhat.com> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/