Posted to tcl by GPS at Mon Nov 12 13:54:51 GMT 2007view raw
- /* Predict that cond will be true and the body should be evaluated. */
- #define ptif(cond,body) do { \
- asm volatile ("cmpl $1,%0\n" \
- ".byte 0x2e\n" \
- "jne 1f\n" : : "r" (cond)); \
- body; \
- asm volatile ("1:"); \
- } while (0)
-
-
- ptif (i != 999999,
- i = 123435353;
- );
-
- .L2:
- cmpl $999999, %ebx
- setne %al
- movzbl %al, %eax
- #APP
- cmpl $1,%eax
- .byte 0x2e
- jne 1f
-
- 1:
- #NO_APP
- movl $123435353, 4(%esp)
- movl $.LC1, (%esp)
-
- Therein lies the problem, the label is reordered...