summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/lib/gray_core.c5
-rw-r--r--apps/plugins/lib/gray_draw.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/apps/plugins/lib/gray_core.c b/apps/plugins/lib/gray_core.c
index f08189dbc2..e65a7f259e 100644
--- a/apps/plugins/lib/gray_core.c
+++ b/apps/plugins/lib/gray_core.c
@@ -690,9 +690,8 @@ void gray_update_rect(int x, int y, int width, int height)
690 690
691 "ldr r2, [%[bpat], r0, lsl #2] \n" /* r2 = bitpattern[byte]; */ 691 "ldr r2, [%[bpat], r0, lsl #2] \n" /* r2 = bitpattern[byte]; */
692 692
693 "add r0, %[rnd], %[rnd], lsl #3 \n" /* multiply by 75 */ 693 "add %[rnd], %[rnd], %[rnd], lsl #2 \n" /* multiply by 75 */
694 "add %[rnd], %[rnd], %[rnd], lsl #1 \n" 694 "rsb %[rnd], %[rnd], %[rnd], lsl #4 \n"
695 "add %[rnd], %[rnd], r0, lsl #3 \n"
696 "add %[rnd], %[rnd], #74 \n" /* add another 74 */ 695 "add %[rnd], %[rnd], #74 \n" /* add another 74 */
697 /* Since the lower bits are not very random: get bits 8..15 (need max. 5) */ 696 /* Since the lower bits are not very random: get bits 8..15 (need max. 5) */
698 "and r1, %[rmsk], %[rnd], lsr #8 \n" /* ..and mask out unneeded bits */ 697 "and r1, %[rmsk], %[rnd], lsr #8 \n" /* ..and mask out unneeded bits */
diff --git a/apps/plugins/lib/gray_draw.c b/apps/plugins/lib/gray_draw.c
index 7df3e13c56..9406664ea2 100644
--- a/apps/plugins/lib/gray_draw.c
+++ b/apps/plugins/lib/gray_draw.c
@@ -898,9 +898,8 @@ static void _writearray(unsigned char *address, const unsigned char *src,
898 "ldrb r0, [%[trns], r0] \n" /* idxtable into pattern index */ 898 "ldrb r0, [%[trns], r0] \n" /* idxtable into pattern index */
899 "ldr r2, [%[bpat], r0, lsl #2] \n" /* r2 = bitpattern[byte]; */ 899 "ldr r2, [%[bpat], r0, lsl #2] \n" /* r2 = bitpattern[byte]; */
900 900
901 "add r0, %[rnd], %[rnd], lsl #3 \n" /* multiply by 75 */ 901 "add %[rnd], %[rnd], %[rnd], lsl #2 \n" /* multiply by 75 */
902 "add %[rnd], %[rnd], %[rnd], lsl #1 \n" 902 "rsb %[rnd], %[rnd], %[rnd], lsl #4 \n"
903 "add %[rnd], %[rnd], r0, lsl #3 \n"
904 "add %[rnd], %[rnd], #74 \n" /* add another 74 */ 903 "add %[rnd], %[rnd], #74 \n" /* add another 74 */
905 /* Since the lower bits are not very random: get bits 8..15 (need max. 5) */ 904 /* Since the lower bits are not very random: get bits 8..15 (need max. 5) */
906 "and r1, %[rmsk], %[rnd], lsr #8 \n" /* ..and mask out unneeded bits */ 905 "and r1, %[rmsk], %[rnd], lsr #8 \n" /* ..and mask out unneeded bits */