make sure we use upper registers

This commit is contained in:
Josh Goebel 2017-04-01 14:40:25 -04:00 committed by Scott Allen
parent e1cce03580
commit 554c21f759
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" "adc r31, __zero_reg__\n"
// load correct bitshift from program RAM // load correct bitshift from program RAM
"lpm %[bit], Z\n" "lpm %[bit], Z\n"
: [row_offset] "=r" (row_offset), : [row_offset] "=a" (row_offset), // upper register (ANDI)
[bit] "=r" (bit) [bit] "=r" (bit)
: [width_offset] "r" ((uint8_t)(WIDTH/8)), : [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), [x] "r" ((uint8_t)x),
"z" (bitshift_left) "z" (bitshift_left)
: "r1", "r0"); : "r1", "r0");