diff options
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r-- | apps/plugins/lib/gray_blockfuncs.c | 2 | ||||
-rw-r--r-- | apps/plugins/lib/gray_drawgraymap.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/apps/plugins/lib/gray_blockfuncs.c b/apps/plugins/lib/gray_blockfuncs.c index 4eea73a63b..47ff1672a8 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) | |||
54 | * see there for an explanation) for all 8 pixels and put them on an | 54 | * see there for an explanation) for all 8 pixels and put them on an |
55 | * extra stack */ | 55 | * extra stack */ |
56 | asm ( | 56 | asm ( |
57 | "sts.l pr,@-r15 \n" /* save pr (fix GCC331 build, cleaner) */ | ||
57 | "mov #8,r3 \n" /* loop count in r3: 8 pixels */ | 58 | "mov #8,r3 \n" /* loop count in r3: 8 pixels */ |
58 | "mov %6,r2 \n" /* copy mask */ | 59 | "mov %6,r2 \n" /* copy mask */ |
59 | 60 | ||
@@ -103,6 +104,7 @@ static void _writeblock(unsigned char *address, unsigned mask, unsigned bits) | |||
103 | "add #-1,r3 \n" /* decrease loop count */ | 104 | "add #-1,r3 \n" /* decrease loop count */ |
104 | "cmp/pl r3 \n" /* loop count > 0? */ | 105 | "cmp/pl r3 \n" /* loop count > 0? */ |
105 | "bt .wb_loop \n" /* yes: loop */ | 106 | "bt .wb_loop \n" /* yes: loop */ |
107 | "lds.l @r15+,pr \n" /* retsore pr */ | ||
106 | : /* outputs */ | 108 | : /* outputs */ |
107 | /* %0, in & out */ "+r"(_gray_random_buffer), | 109 | /* %0, in & out */ "+r"(_gray_random_buffer), |
108 | /* %1, in & out */ "+r"(pat_ptr) | 110 | /* %1, in & out */ "+r"(pat_ptr) |
diff --git a/apps/plugins/lib/gray_drawgraymap.c b/apps/plugins/lib/gray_drawgraymap.c index 5febeb27ad..dc33446527 100644 --- a/apps/plugins/lib/gray_drawgraymap.c +++ b/apps/plugins/lib/gray_drawgraymap.c | |||
@@ -49,6 +49,7 @@ static void _writearray(unsigned char *address, unsigned char *src, int stride, | |||
49 | * _writepixel, see there for an explanation) for all 8 pixels and put them | 49 | * _writepixel, see there for an explanation) for all 8 pixels and put them |
50 | * on an extra "stack" */ | 50 | * on an extra "stack" */ |
51 | asm ( | 51 | asm ( |
52 | "sts.l pr,@-r15 \n" /* save pr (fix GCC331 build, cleaner) */ | ||
52 | "mov #8,r3 \n" /* loop count in r3: 8 pixels */ | 53 | "mov #8,r3 \n" /* loop count in r3: 8 pixels */ |
53 | "mov %7,r2 \n" /* copy mask */ | 54 | "mov %7,r2 \n" /* copy mask */ |
54 | 55 | ||
@@ -98,6 +99,7 @@ static void _writearray(unsigned char *address, unsigned char *src, int stride, | |||
98 | "add #-1,r3 \n" /* decrease loop count */ | 99 | "add #-1,r3 \n" /* decrease loop count */ |
99 | "cmp/pl r3 \n" /* loop count > 0? */ | 100 | "cmp/pl r3 \n" /* loop count > 0? */ |
100 | "bt .wa_loop \n" /* yes: loop */ | 101 | "bt .wa_loop \n" /* yes: loop */ |
102 | "lds.l @r15+,pr \n" /* restore pr */ | ||
101 | : /* outputs */ | 103 | : /* outputs */ |
102 | /* %0, in & out */ "+r"(_gray_random_buffer), | 104 | /* %0, in & out */ "+r"(_gray_random_buffer), |
103 | /* %1, in & out */ "+r"(pat_ptr) | 105 | /* %1, in & out */ "+r"(pat_ptr) |