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'""
This commit is contained in:
Josh Goebel 2017-04-21 20:13:31 -04:00 committed by Scott Allen
parent 606c80268b
commit b4d8fd8d6f
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}