aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2009-10-02 23:11:03 +0000
committerMåns Rullgård <mans@mansr.com>2009-10-02 23:11:03 +0000
commitc61e40b728513c23fbfb662989a39c806ee40bca (patch)
tree321869a82af4ce5f8b160776328dcee85647e645
parentb44c6d8edb442fb976030dc970b4153bd57c423e (diff)
downloadffmpeg-c61e40b728513c23fbfb662989a39c806ee40bca.tar.gz
ARM: use plain labels for pc-relative addressing
Originally committed as revision 20152 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/arm/jrevdct_arm.S2
-rw-r--r--libavcodec/arm/simple_idct_arm.S2
-rw-r--r--libavcodec/arm/simple_idct_armv5te.S14
3 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/arm/jrevdct_arm.S b/libavcodec/arm/jrevdct_arm.S
index b77315b0f5..6fcb2e94b5 100644
--- a/libavcodec/arm/jrevdct_arm.S
+++ b/libavcodec/arm/jrevdct_arm.S
@@ -65,7 +65,7 @@ function j_rev_dct_ARM, export=1
mov lr, r0 @ lr = pointer to the current row
mov r12, #8 @ r12 = row-counter
- add r11, pc, #(const_array-.-8) @ r11 = base pointer to the constants array
+ adr r11, const_array @ r11 = base pointer to the constants array
row_loop:
ldrsh r0, [lr, # 0] @ r0 = 'd0'
ldrsh r2, [lr, # 2] @ r2 = 'd2'
diff --git a/libavcodec/arm/simple_idct_arm.S b/libavcodec/arm/simple_idct_arm.S
index 9e5e621c51..df51c01df2 100644
--- a/libavcodec/arm/simple_idct_arm.S
+++ b/libavcodec/arm/simple_idct_arm.S
@@ -66,7 +66,7 @@ function simple_idct_ARM, export=1
stmfd sp!, {r4-r11, r14} @ R14 is also called LR
@@ at this point, R0=block, other registers are free.
add r14, r0, #112 @ R14=&block[8*7], better start from the last row, and decrease the value until row=0, i.e. R12=block.
- add r12, pc, #(__constant_ptr__-.-8) @ R12=__constant_ptr__, the vector containing the constants, probably not necessary to reserve a register for it
+ adr r12, __constant_ptr__ @ R12=__constant_ptr__, the vector containing the constants, probably not necessary to reserve a register for it
@@ add 2 temporary variables in the stack: R0 and R14
sub sp, sp, #8 @ allow 2 local variables
str r0, [sp, #0] @ save block in sp[0]
diff --git a/libavcodec/arm/simple_idct_armv5te.S b/libavcodec/arm/simple_idct_armv5te.S
index 58040ec1ba..9ab8b9eec7 100644
--- a/libavcodec/arm/simple_idct_armv5te.S
+++ b/libavcodec/arm/simple_idct_armv5te.S
@@ -57,7 +57,7 @@ function idct_row_armv5te
mov ip, #16384
sub ip, ip, #1 /* ip = W4 */
smlabb v1, ip, a3, v1 /* v1 = W4*row[0]+(1<<(RS-1)) */
- ldr ip, [pc, #(w26-.-8)] /* ip = W2 | (W6 << 16) */
+ ldr ip, w26 /* ip = W2 | (W6 << 16) */
smultb a2, ip, a4
smulbb lr, ip, a4
add v2, v1, a2
@@ -65,8 +65,8 @@ function idct_row_armv5te
sub v4, v1, lr
add v1, v1, lr
- ldr ip, [pc, #(w13-.-8)] /* ip = W1 | (W3 << 16) */
- ldr lr, [pc, #(w57-.-8)] /* lr = W5 | (W7 << 16) */
+ ldr ip, w13 /* ip = W1 | (W3 << 16) */
+ ldr lr, w57 /* lr = W5 | (W7 << 16) */
smulbt v5, ip, a3
smultt v6, lr, a4
smlatt v5, ip, a4, v5
@@ -93,7 +93,7 @@ function idct_row_armv5te
smlatt v7, ip, a4, v7
sub fp, fp, a2
- ldr ip, [pc, #(w26-.-8)] /* ip = W2 | (W6 << 16) */
+ ldr ip, w26 /* ip = W2 | (W6 << 16) */
mov a2, #16384
sub a2, a2, #1 /* a2 = W4 */
smulbb a2, a2, a3 /* a2 = W4*row[4] */
@@ -177,7 +177,7 @@ row_dc_only:
sub v4, v2, a3
sub v6, v2, a3
add fp, v2, a3
- ldr ip, [pc, #(w26-.-8)]
+ ldr ip, w26
ldr a4, [a1, #(16*2)]
add v2, v2, a3
@@ -210,9 +210,9 @@ row_dc_only:
stmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp}
- ldr ip, [pc, #(w13-.-8)]
+ ldr ip, w13
ldr a4, [a1, #(16*1)]
- ldr lr, [pc, #(w57-.-8)]
+ ldr lr, w57
smulbb v1, ip, a4
smultb v3, ip, a4
smulbb v5, lr, a4