make sure we use upper registers

This commit is contained in:
Josh Goebel 2017-04-01 14:40:25 -04:00
parent dfbe2dda3b
commit 07c321cd44
1 changed files with 2 additions and 2 deletions

View File

@ -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");