From be30d1dd9b4c17a0df0a862be95974421bea4c05 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Sat, 29 May 2021 09:09:25 +0200 Subject: Change release optimization mode to -O3 --- Makefile | 2 +- src/common.h | 5 +++++ src/main.c | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 100c861..3f68019 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ CFLAGS += $(INC_FLAGS) CFLAGS += $(CONFIG) LDFLAGS := $(ARCH) $(SPECS) LDLIBS := $(LIBGBA) -RELEASE_CFLAGS := -DNDEBUG -O2 +RELEASE_CFLAGS := -DNDEBUG -O3 DEBUG_CFLAGS := -DDEBUG -O2 -g .PHONY: clean run diff --git a/src/common.h b/src/common.h index 12114d7..0d6c89f 100644 --- a/src/common.h +++ b/src/common.h @@ -260,6 +260,11 @@ u32 profile_stop(void) { return (TIMER_DATA_3 << 16) | TIMER_DATA_2; } +static inline +u32 profile_measure(void) { + return (TIMER_DATA_3 << 16) | TIMER_DATA_2; +} + // // Input handling. // diff --git a/src/main.c b/src/main.c index 255c790..9a22000 100644 --- a/src/main.c +++ b/src/main.c @@ -36,7 +36,7 @@ WITH REGARD TO THIS SOFTWARE. #ifdef PROF_ENABLE #if PROF_ENABLE == 0 #define PROF(F,VAR) (profile_start(),(F),(VAR) = profile_stop()) -#else +#elif PROF_ENABLE == 1 #define PROF(F,VAR) (profile_start(),(F),(VAR) = MAX(profile_stop(), (VAR))) #endif #define PROF_SHOW(X,Y) \ @@ -416,6 +416,7 @@ int main(void) { txt_init(1, TEXT_LAYER); txt_position(0,0); + // Initialize sound mixer. init_sound(); // Main loop. -- cgit v1.2.1