Mercurial > libavcodec.hg
changeset 10350:989ea69f6a4e libavcodec
ARM: use plain labels for pc-relative addressing
author | mru |
---|---|
date | Fri, 02 Oct 2009 23:11:03 +0000 |
parents | be725249ea67 |
children | 997bdf43a4ed |
files | arm/jrevdct_arm.S arm/simple_idct_arm.S arm/simple_idct_armv5te.S |
diffstat | 3 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/arm/jrevdct_arm.S Fri Oct 02 19:35:12 2009 +0000 +++ b/arm/jrevdct_arm.S Fri Oct 02 23:11:03 2009 +0000 @@ -65,7 +65,7 @@ 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'
--- a/arm/simple_idct_arm.S Fri Oct 02 19:35:12 2009 +0000 +++ b/arm/simple_idct_arm.S Fri Oct 02 23:11:03 2009 +0000 @@ -66,7 +66,7 @@ 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]
--- a/arm/simple_idct_armv5te.S Fri Oct 02 19:35:12 2009 +0000 +++ b/arm/simple_idct_armv5te.S Fri Oct 02 23:11:03 2009 +0000 @@ -57,7 +57,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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