summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/gray_blockfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/gray_blockfuncs.c')
-rw-r--r--apps/plugins/lib/gray_blockfuncs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/plugins/lib/gray_blockfuncs.c b/apps/plugins/lib/gray_blockfuncs.c
index 4eea73a..47ff167 100644
--- a/apps/plugins/lib/gray_blockfuncs.c
+++ b/apps/plugins/lib/gray_blockfuncs.c
@@ -54,6 +54,7 @@ static void _writeblock(unsigned char *address, unsigned mask, unsigned bits)
* see there for an explanation) for all 8 pixels and put them on an
* extra stack */
asm (
+ "sts.l pr,@-r15 \n" /* save pr (fix GCC331 build, cleaner) */
"mov #8,r3 \n" /* loop count in r3: 8 pixels */
"mov %6,r2 \n" /* copy mask */
@@ -103,6 +104,7 @@ static void _writeblock(unsigned char *address, unsigned mask, unsigned bits)
"add #-1,r3 \n" /* decrease loop count */
"cmp/pl r3 \n" /* loop count > 0? */
"bt .wb_loop \n" /* yes: loop */
+ "lds.l @r15+,pr \n" /* retsore pr */
: /* outputs */
/* %0, in & out */ "+r"(_gray_random_buffer),
/* %1, in & out */ "+r"(pat_ptr)