]> granicus.if.org Git - libvpx/commitdiff
Fix valgrind errors in the NEON loop filters.
authorTimothy B. Terriberry <tterribe@xiph.org>
Fri, 1 Oct 2010 03:40:45 +0000 (20:40 -0700)
committerTimothy B. Terriberry <tterribe@xiph.org>
Fri, 1 Oct 2010 03:40:45 +0000 (20:40 -0700)
Like the ARMv6 code, these functions were accessing values below
 the stack pointer, which can be corrupted by signal delivery at
 any time.

vp8/common/arm/neon/mbloopfilterverticaledge_uv_neon.asm
vp8/common/arm/neon/mbloopfilterverticaledge_y_neon.asm

index 33cd55e1c95948026294eea262a378df220c887c..044b3a3a8fe326b64b84d685a64a38f26a373f43 100644 (file)
 
     sub         sp, sp, #32
     vld1.s8     {d4[], d5[]}, [r12]         ; thresh
-    vst1.u8     {q3}, [sp]!
+    mov         r12, sp
+    vst1.u8     {q3}, [r12]!
+    vst1.u8     {q10}, [r12]!
     ldr         r12, _mbvlfuv_coeff_
-    vst1.u8     {q10}, [sp]!
 
     ; vp8_filter_mask
     vabd.u8     q11, q3, q4                 ; abs(p3 - p2)
 
     vld1.u8     {d5}, [r12]!                ;#27
 
-    sub         sp, sp, #32
-
     vqadd.s8    q6, q6, q13                 ; ps0 = vp8_signed_char_clamp(ps0 + Filter2)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
index f51fd0bd4a01f36d8fde65c7374c9a65b1b56cb4..e0716625ce555b01137eb817b2337d2c989a6a63 100644 (file)
     vtrn.8      q7, q8
     vtrn.8      q9, q10
 
-    vld1.s8     {d2[], d3[]}, [r3]          ; limit
-    vst1.u8     {q3}, [sp]!
     vld1.s8     {d4[], d5[]}, [r12]         ; thresh
+    vld1.s8     {d2[], d3[]}, [r3]          ; limit
+    mov         r12, sp
+    vst1.u8     {q3}, [r12]!
+    vst1.u8     {q10}, [r12]!
     ldr         r12, _mbvlfy_coeff_
-    vst1.u8     {q10}, [sp]!
 
     ; vp8_filter_mask
     vabd.u8     q11, q3, q4                 ; abs(p3 - p2)
 
     vld1.u8     {d6}, [r12]!                ;#18
     sub         r0, r0, r1, lsl #4
-    sub         sp, sp, #32
 
     add         r2, r0, r1