… | |
… | |
87 | #endif |
87 | #endif |
88 | |
88 | |
89 | /* put into ifs if you are very sure that the expression */ |
89 | /* put into ifs if you are very sure that the expression */ |
90 | /* is mostly true or mosty false. note that these return */ |
90 | /* is mostly true or mosty false. note that these return */ |
91 | /* booleans, not the expression. */ |
91 | /* booleans, not the expression. */ |
92 | #define ecb_unlikely(expr) ecb_expect ((expr) ? 1 : 0, 0) |
92 | #define ecb_unlikely(expr) ecb_expect (!!(expr), 0) |
93 | #define ecb_likely(expr) ecb_expect ((expr) ? 1 : 0, 1) |
93 | #define ecb_likely(expr) ecb_expect (!!(expr), 1) |
94 | |
94 | |
95 | /* try to tell the compiler that some condition is definitely true */ |
95 | /* try to tell the compiler that some condition is definitely true */ |
96 | #define ecb_assume(cond) do { if (!(cond)) unreachable (); } while (0) |
96 | #define ecb_assume(cond) do { if (!(cond)) unreachable (); } while (0) |
97 | |
97 | |
98 | /* count trailing zero bits and count # of one bits */ |
98 | /* count trailing zero bits and count # of one bits */ |