From 554c21f759876a2077f8d91cc90006caa0a1c863 Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Sat, 1 Apr 2017 14:40:25 -0400 Subject: [PATCH] make sure we use upper registers --- src/Arduboy2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Arduboy2.cpp b/src/Arduboy2.cpp index feb77b7..6eb4f0c 100644 --- a/src/Arduboy2.cpp +++ b/src/Arduboy2.cpp @@ -301,10 +301,10 @@ void Arduboy2Base::drawPixel(int16_t x, int16_t y, uint8_t color) "adc r31, __zero_reg__\n" // load correct bitshift from program RAM "lpm %[bit], Z\n" - : [row_offset] "=r" (row_offset), + : [row_offset] "=a" (row_offset), // upper register (ANDI) [bit] "=r" (bit) : [width_offset] "r" ((uint8_t)(WIDTH/8)), - [y] "r" ((uint8_t)y), + [y] "a" ((uint8_t)y), // upper register (ANDI) [x] "r" ((uint8_t)x), "z" (bitshift_left) : "r1", "r0");