Back in 2000 I wrote a really simple patch that caused gcc to treat an
ASM_OPERANDS that clobbered "pc" as a control flow barrier, exactly
for this problem.

http://gcc.gnu.org/ml/gcc-patches/2000-01/msg00190.html

I still think it was a good idea, but at the time it was received
unenthusiastically.  I especially think "just use __builtin_trap()"
misses the mark - at least some variants of the Linux kernel's BUG()
macro, for instance, want to stick annotations in the assembly stream,
which you cannot do with __builtin_trap...

zw

Reply via email to