From 67278a6d8abe44a7f15fbbb8cefc334ee53feea3 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 12 Oct 2018 23:23:15 -0400 Subject: [PATCH] sam3x8e: Align loops to a 16 byte boundary It appears the sam3x8e has a primitive cache prefetch mechanism (it prefetches 32 bytes at a time aligned to a 16 byte boundary). Aligning the main loop in timer_dispatch_many() to a 16 byte boundary significantly improves performance. Signed-off-by: Kevin O'Connor --- src/sam3x8e/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sam3x8e/Makefile b/src/sam3x8e/Makefile index ee144a02..c5e0607b 100644 --- a/src/sam3x8e/Makefile +++ b/src/sam3x8e/Makefile @@ -6,7 +6,7 @@ CROSS_PREFIX=arm-none-eabi- dirs-y += src/sam3x8e src/generic dirs-y += lib/sam3x/gcc/gcc -CFLAGS += -mthumb -mcpu=cortex-m3 +CFLAGS += -mthumb -mcpu=cortex-m3 -falign-loops=16 CFLAGS += -Ilib/sam3x/include -Ilib/cmsis-core CFLAGS += -D__SAM3X8E__