summaryrefslogtreecommitdiff
path: root/vp8/decoder
diff options
context:
space:
mode:
authorMike Hommey <mhommey@mozilla.com>2011-06-17 02:33:52 +0200
committerMike Hommey <mhommey@mozilla.com>2011-06-28 09:11:40 +0200
commite3f850ee055a9238d17d6c503af27e287e6db28d (patch)
tree4cc0628182d61e317805f90efafba2c86de7bb86 /vp8/decoder
parentbe99868bd16fd46c7009e7052131705c116bda5a (diff)
downloadlibvpx-e3f850ee055a9238d17d6c503af27e287e6db28d.tar
libvpx-e3f850ee055a9238d17d6c503af27e287e6db28d.tar.gz
libvpx-e3f850ee055a9238d17d6c503af27e287e6db28d.tar.bz2
libvpx-e3f850ee055a9238d17d6c503af27e287e6db28d.zip
Avoid text relocations in ARM vp8 decoder
The current code stores pointers to coefficient tables and loads them to access the tables contents. As these pointers are stored in the code sections, it means we end up with text relocations. eu-findtextrel will thus complain about code not compiled with -fpic/-fPIC. Since the pointers are stored in the code sections, we can actually cheat and let the assembler generate relative addressing when accessing the coefficient tables, and just load their location with adr. Change-Id: Ib74ae2d3f2bab80b29991355f2dbe6955f38f6ae
Diffstat (limited to 'vp8/decoder')
-rw-r--r--vp8/decoder/arm/neon/dequant_idct_neon.asm3
-rw-r--r--vp8/decoder/arm/neon/idct_dequant_dc_full_2x_neon.asm3
-rw-r--r--vp8/decoder/arm/neon/idct_dequant_full_2x_neon.asm3
3 files changed, 3 insertions, 6 deletions
diff --git a/vp8/decoder/arm/neon/dequant_idct_neon.asm b/vp8/decoder/arm/neon/dequant_idct_neon.asm
index 1923be42a..4bf661857 100644
--- a/vp8/decoder/arm/neon/dequant_idct_neon.asm
+++ b/vp8/decoder/arm/neon/dequant_idct_neon.asm
@@ -35,7 +35,7 @@
ldr r1, [sp, #4] ; stride
- ldr r12, _CONSTANTS_
+ adr r12, cospi8sqrt2minus1 ; pointer to the first constant
vmul.i16 q1, q3, q5 ;input for short_idct4x4llm_neon
vmul.i16 q2, q4, q6
@@ -123,7 +123,6 @@
ENDP ; |vp8_dequant_idct_add_neon|
; Constant Pool
-_CONSTANTS_ DCD cospi8sqrt2minus1
cospi8sqrt2minus1 DCD 0x4e7b4e7b
sinpi8sqrt2 DCD 0x8a8c8a8c
diff --git a/vp8/decoder/arm/neon/idct_dequant_dc_full_2x_neon.asm b/vp8/decoder/arm/neon/idct_dequant_dc_full_2x_neon.asm
index ad4364adc..61fa66075 100644
--- a/vp8/decoder/arm/neon/idct_dequant_dc_full_2x_neon.asm
+++ b/vp8/decoder/arm/neon/idct_dequant_dc_full_2x_neon.asm
@@ -41,7 +41,7 @@
ldr r1, [sp, #4]
vld1.32 {d31[1]}, [r12]
- ldr r2, _CONSTANTS_
+ adr r2, cospi8sqrt2minus1 ; pointer to the first constant
ldrh r12, [r1], #2 ; lo *dc
ldrh r1, [r1] ; hi *dc
@@ -198,7 +198,6 @@
ENDP ; |idct_dequant_dc_full_2x_neon|
; Constant Pool
-_CONSTANTS_ DCD cospi8sqrt2minus1
cospi8sqrt2minus1 DCD 0x4e7b
; because the lowest bit in 0x8a8c is 0, we can pre-shift this
sinpi8sqrt2 DCD 0x4546
diff --git a/vp8/decoder/arm/neon/idct_dequant_full_2x_neon.asm b/vp8/decoder/arm/neon/idct_dequant_full_2x_neon.asm
index 85fff11b3..772ec4685 100644
--- a/vp8/decoder/arm/neon/idct_dequant_full_2x_neon.asm
+++ b/vp8/decoder/arm/neon/idct_dequant_full_2x_neon.asm
@@ -40,7 +40,7 @@
vld1.32 {d31[0]}, [r2]
vld1.32 {d31[1]}, [r12]
- ldr r2, _CONSTANTS_
+ adr r2, cospi8sqrt2minus1 ; pointer to the first constant
; dequant: q[i] = q[i] * dq[i]
vmul.i16 q2, q2, q0
@@ -190,7 +190,6 @@
ENDP ; |idct_dequant_full_2x_neon|
; Constant Pool
-_CONSTANTS_ DCD cospi8sqrt2minus1
cospi8sqrt2minus1 DCD 0x4e7b
; because the lowest bit in 0x8a8c is 0, we can pre-shift this
sinpi8sqrt2 DCD 0x4546