diff --git a/libc/vga/tty-graph.c b/libc/vga/tty-graph.c index 77cbc8a93..7a6f3429b 100644 --- a/libc/vga/tty-graph.c +++ b/libc/vga/tty-graph.c @@ -37,6 +37,7 @@ */ #undef KLOGTTY +#define MAYUNROLLLOOPS unrollloops #define COLOR TtyCanvasColor #define BPP 32 diff --git a/libc/vga/tty-graph.inc b/libc/vga/tty-graph.inc index 4387f36cd..722e4dc58 100644 --- a/libc/vga/tty-graph.inc +++ b/libc/vga/tty-graph.inc @@ -258,8 +258,9 @@ static void DRAWBITMAP(struct Tty *tty, size_t gy, size_t gx, DIRTY(tty, gy, gx, gy + bm_ht, gx + bm_wid); } -static unrollloops void FILLRECT(struct Tty *tty, size_t gy, size_t gx, - size_t fill_ht, size_t fill_wid, COLOR bg) { +static MAYUNROLLLOOPS void FILLRECT(struct Tty *tty, size_t gy, size_t gx, + size_t fill_ht, size_t fill_wid, + COLOR bg) { size_t xs = tty->xs; char *cplotter = tty->canvas + gy * xs + gx * sizeof(COLOR); size_t yleft = fill_ht, xleft; diff --git a/libc/vga/tty-klog.greg.c b/libc/vga/tty-klog.greg.c index 8e9897ea9..3b957d858 100644 --- a/libc/vga/tty-klog.greg.c +++ b/libc/vga/tty-klog.greg.c @@ -37,7 +37,10 @@ * @see libc/vga/tty-graph.inc */ +#pragma GCC optimize("s") + #define KLOGTTY +#define MAYUNROLLLOOPS /* do not unroll loops; keep the code small! */ /* Instantiate output routines for 16-bit pixel formats. */ #define COLOR uint16_t