http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49094
--- Comment #13 from Søren Holm <sgh at sgh dot dk> 2011-07-30 12:37:41 UTC ---
gcc 4.4.6 generates the following code with the "static" keyword
unsigned int aostk_font_strwidth(const struct aostk_font* font, const char*
str) {
0: e5d02004 ldrb r2, [r0, #4]
4: e5d03003 ldrb r3, [r0, #3]
8: e5d01005 ldrb r1, [r0, #5]
c: e1833402 orr r3, r3, r2, lsl #8
10: e5d02006 ldrb r2, [r0, #6]
14: e1833801 orr r3, r3, r1, lsl #16
18: e1833c02 orr r3, r3, r2, lsl #24
const struct aostk_glyph* g = aostk_get_glyph(font, 0);
return g->advance.x;
}
1c: e5d30005 ldrb r0, [r3, #5]
20: e12fff1e bx lr