| 1 |
root |
1.1 |
|
| 2 |
|
|
=head2 GCC ATTRIBUTES |
| 3 |
|
|
|
| 4 |
|
|
=over 4 |
| 5 |
|
|
|
| 6 |
root |
1.2 |
=item ecb_attribute ((attrs...)) |
| 7 |
root |
1.1 |
|
| 8 |
root |
1.2 |
A simple wrapper that expands to C<__attribute__((attrs))> on GCC, and |
| 9 |
|
|
to nothing on other compilers, so the effect is that only GCC sees these. |
| 10 |
|
|
|
| 11 |
|
|
=item ecb_noinline |
| 12 |
|
|
|
| 13 |
|
|
=item ecb_noreturn |
| 14 |
|
|
|
| 15 |
|
|
=item ecb_unused |
| 16 |
|
|
|
| 17 |
|
|
=item ecb_const |
| 18 |
|
|
|
| 19 |
|
|
=item ecb_pure |
| 20 |
|
|
|
| 21 |
|
|
=item ecb_hot |
| 22 |
|
|
|
| 23 |
|
|
=item ecb_cold |
| 24 |
|
|
|
| 25 |
|
|
=item ecb_artificial |
| 26 |
|
|
|
| 27 |
|
|
=back |
| 28 |
root |
1.1 |
|
| 29 |
|
|
=head2 OPTIMISATION HINTS |
| 30 |
|
|
|
| 31 |
|
|
=over 4 |
| 32 |
|
|
|
| 33 |
|
|
=item bool ecb_is_constant(expr) |
| 34 |
|
|
|
| 35 |
|
|
=item bool ecb_expect(expr,value) |
| 36 |
|
|
|
| 37 |
|
|
=item bool ecb_unlikely(bool) |
| 38 |
|
|
|
| 39 |
|
|
=item bool ecb_likely(bool) |
| 40 |
|
|
|
| 41 |
|
|
=item bool ecb_assume(cond) |
| 42 |
|
|
|
| 43 |
|
|
=item bool ecb_unreachable() |
| 44 |
|
|
|
| 45 |
|
|
=item bool ecb_prefetch(addr,rw,locality) |
| 46 |
|
|
|
| 47 |
root |
1.2 |
=back |
| 48 |
root |
1.1 |
|
| 49 |
|
|
=head2 BIT FIDDLING / BITSTUFFS |
| 50 |
|
|
|
| 51 |
|
|
bool ecb_big_endian (); |
| 52 |
|
|
bool ecb_little_endian (); |
| 53 |
|
|
int ecb_ctz32 (uint32_t x); |
| 54 |
|
|
int ecb_popcount32 (uint32_t x); |
| 55 |
|
|
uint32_t ecb_bswap32 (uint32_t x); |
| 56 |
|
|
uint32_t ecb_bswap16 (uint32_t x); |
| 57 |
|
|
uint32_t ecb_rotr32 (uint32_t x, unsigned int count); |
| 58 |
|
|
uint32_t ecb_rotl32 (uint32_t x, unsigned int count); |
| 59 |
|
|
|
| 60 |
|
|
=head2 ARITHMETIC |
| 61 |
|
|
|
| 62 |
|
|
x = ecb_mod (m, n) |
| 63 |
|
|
|
| 64 |
|
|
=head2 UTILITY |
| 65 |
|
|
|
| 66 |
|
|
ecb_array_length (name) |
| 67 |
|
|
|
| 68 |
|
|
|