From 6ded14fb0eb160cc5a41f850dc723553df7240d0 Mon Sep 17 00:00:00 2001 From: "Blake W. Ford" Date: Tue, 12 Feb 2019 01:26:32 -0600 Subject: [PATCH] Use local label for loop in fillScreen() assembly To fix error: symbol loopto is already defined with -O3 optimization. --- src/Arduboy2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Arduboy2.cpp b/src/Arduboy2.cpp index 23a023a..abe4cb4 100644 --- a/src/Arduboy2.cpp +++ b/src/Arduboy2.cpp @@ -678,7 +678,7 @@ void Arduboy2Base::fillScreen(uint8_t color) "ldi %[color], 0xFF\n" // counter = 0 "clr __tmp_reg__\n" - "loopto:\n" + "1:\n" // (4x) push zero into screen buffer, // then increment buffer position "st Z+, %[color]\n" @@ -689,7 +689,7 @@ void Arduboy2Base::fillScreen(uint8_t color) "inc __tmp_reg__\n" // repeat for 256 loops // (until counter rolls over back to 0) - "brne loopto\n" + "brne 1b\n" : [color] "+d" (color), "+z" (bPtr) :