From e307cdc725b385bf98e97f9c3826c9a5fe0492ed Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Fri, 21 Apr 2017 20:13:31 -0400 Subject: [PATCH] fix register pressure - declare a high register clobber This seems to have the side effect of freeing up a high register and preventing the error: "can't find a register in class 'LD_REGS' while reloading 'asm'"" --- src/Sprites.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Sprites.cpp b/src/Sprites.cpp index 545a8a9..0b3dbe2 100644 --- a/src/Sprites.cpp +++ b/src/Sprites.cpp @@ -347,7 +347,10 @@ void Sprites::drawBitmap(int16_t x, int16_t y, [sprite_ofs_jump] "r" ((w-rendered_width)*2), [yOffset] "r" (yOffset), [mul_amt] "r" (mul_amt) - : + // declaring an extra high register clobber here for some reason + // prevents a compile error for some sketches: + // can't find a register in class 'LD_REGS' while reloading 'asm' + : "r24" ); break; }