diff options
-rw-r--r-- | draw/draw_scale.c | 10 | ||||
-rw-r--r-- | draw/draw_simple_scale.c | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/draw/draw_scale.c b/draw/draw_scale.c index b34f9770..b2e28b7b 100644 --- a/draw/draw_scale.c +++ b/draw/draw_scale.c @@ -260,6 +260,8 @@ leave enough space) and then reordering afterwards. typedef struct fz_weights_s fz_weights; +/* This structure is accessed from ARM code - bear this in mind before + * altering it! */ struct fz_weights_s { int flip; /* true if outputting reversed */ @@ -616,7 +618,7 @@ scale_row_to_temp1(int *dst, unsigned char *src, fz_weights *weights) "@ r1 = src \n" "@ r2 = weights \n" "ldr r12,[r2],#4 @ r12= flip \n" - "ldr r3, [r2],#16 @ r3 = count r2 = &index\n" + "ldr r3, [r2],#20 @ r3 = count r2 = &index\n" "ldr r4, [r2] @ r4 = index[0] \n" "cmp r12,#0 @ if (flip) \n" "beq 4f @ { \n" @@ -676,7 +678,7 @@ scale_row_to_temp2(int *dst, unsigned char *src, fz_weights *weights) "@ r1 = src \n" "@ r2 = weights \n" "ldr r12,[r2],#4 @ r12= flip \n" - "ldr r3, [r2],#16 @ r3 = count r2 = &index\n" + "ldr r3, [r2],#20 @ r3 = count r2 = &index\n" "ldr r4, [r2] @ r4 = index[0] \n" "cmp r12,#0 @ if (flip) \n" "beq 4f @ { \n" @@ -740,7 +742,7 @@ scale_row_to_temp4(int *dst, unsigned char *src, fz_weights *weights) "@ r1 = src \n" "@ r2 = weights \n" "ldr r12,[r2],#4 @ r12= flip \n" - "ldr r3, [r2],#16 @ r3 = count r2 = &index\n" + "ldr r3, [r2],#20 @ r3 = count r2 = &index\n" "ldr r4, [r2] @ r4 = index[0] \n" "cmp r12,#0 @ if (flip) \n" "beq 4f @ { \n" @@ -814,7 +816,7 @@ scale_row_from_temp(unsigned char *dst, int *src, fz_weights *weights, int width asm volatile( ENTER_ARM "ldr r12,[r13] @ r12= row \n" - "add r2, r2, #20 @ r2 = weights->index \n" + "add r2, r2, #24 @ r2 = weights->index \n" "stmfd r13!,{r4-r11,r14} \n" "@ r0 = dst \n" "@ r1 = src \n" diff --git a/draw/draw_simple_scale.c b/draw/draw_simple_scale.c index 1329b0e0..2d436b54 100644 --- a/draw/draw_simple_scale.c +++ b/draw/draw_simple_scale.c @@ -216,6 +216,8 @@ leave enough space) and then reordering afterwards. typedef struct fz_weights_s fz_weights; +/* This structure is accessed from ARM code - bear this in mind before + * altering it! */ struct fz_weights_s { int flip; /* true if outputting reversed */ @@ -583,7 +585,7 @@ scale_row_to_temp1(unsigned char *dst, unsigned char *src, fz_weights *weights) "@ r1 = src \n" "@ r2 = weights \n" "ldr r12,[r2],#4 @ r12= flip \n" - "ldr r3, [r2],#16 @ r3 = count r2 = &index\n" + "ldr r3, [r2],#20 @ r3 = count r2 = &index\n" "ldr r4, [r2] @ r4 = index[0] \n" "cmp r12,#0 @ if (flip) \n" "beq 4f @ { \n" @@ -645,7 +647,7 @@ scale_row_to_temp2(unsigned char *dst, unsigned char *src, fz_weights *weights) "@ r1 = src \n" "@ r2 = weights \n" "ldr r12,[r2],#4 @ r12= flip \n" - "ldr r3, [r2],#16 @ r3 = count r2 = &index\n" + "ldr r3, [r2],#20 @ r3 = count r2 = &index\n" "ldr r4, [r2] @ r4 = index[0] \n" "cmp r12,#0 @ if (flip) \n" "beq 4f @ { \n" @@ -715,7 +717,7 @@ scale_row_to_temp4(unsigned char *dst, unsigned char *src, fz_weights *weights) "@ r1 = src \n" "@ r2 = weights \n" "ldr r12,[r2],#4 @ r12= flip \n" - "ldr r3, [r2],#16 @ r3 = count r2 = &index\n" + "ldr r3, [r2],#20 @ r3 = count r2 = &index\n" "ldr r4, [r2] @ r4 = index[0] \n" "ldr r5,=0x00800080 @ r5 = rounding \n" "ldr r6,=0x00FF00FF @ r7 = 0x00FF00FF \n" @@ -785,7 +787,7 @@ scale_row_from_temp(unsigned char *dst, unsigned char *src, fz_weights *weights, asm volatile( ENTER_ARM "ldr r12,[r13] @ r12= row \n" - "add r2, r2, #20 @ r2 = weights->index \n" + "add r2, r2, #24 @ r2 = weights->index \n" "stmfd r13!,{r4-r11,r14} \n" "@ r0 = dst \n" "@ r1 = src \n" |