From f0e58643098efafecf77d2b9115dfff16f931868 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 29 Jul 2020 14:58:34 +0200 Subject: Switched to -Os flag and fixed issues with it Somehow the insl function gets optimized to one instruction so I need a gcc attribute to exclude this function from optimization. I may fix this in the future though. Anyways, the kernel is waay smaller now! :) --- src/drivers/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/drivers') diff --git a/src/drivers/cpu.c b/src/drivers/cpu.c index d6a1760..945dc4a 100644 --- a/src/drivers/cpu.c +++ b/src/drivers/cpu.c @@ -24,7 +24,8 @@ u32 inl(u16 port) return value; } -void insl(u16 port, void *addr, int n) +// TODO: Fix optimization issues with insl +void __attribute__((optimize("O0"))) insl(u16 port, void *addr, int n) { __asm__("cld; rep insl" : "=D"(addr), "=c"(n) -- cgit v1.2.3