Messages in this thread | ![/](/images/icornerl.gif) | | Date | Wed, 10 Sep 2003 22:52:26 +0100 | From | Jamie Lokier <> | Subject | Re: [PATCH] oops_in_progress is unlikely() |
| |
Pavel Machek wrote: > He's right. Even without subsections you can move code somewhere > outside the function. And gcc should be smart enough to do that.
It is:
extern int a, b; int test() { if (__builtin_expect(a > 1, 1)) foo(); else bar(); return b; }
Compiles to (with gcc -Os -fomit-frame-pointer):
test: cmpl $1, a jle .L2 call foo .L3: movl b, %eax ret .L2: call bar jmp .L3
Enjoy, -- Jamie - 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/
| ![\](/images/icornerr.gif) |