summaryrefslogblamecommitdiff
path: root/user/libmpeg2/arm-textrel.patch
blob: 0a75cebfbc7e461bb9d421520a6dcd5ef82d4f9e (plain) (tree)




































































































                                                                   
--- libmpeg2-0.5.1.orig/libmpeg2/motion_comp_arm_s.S
+++ libmpeg2-0.5.1/libmpeg2/motion_comp_arm_s.S
@@ -30,8 +30,8 @@
         stmfd sp!, {r4-r11, lr} @ R14 is also called LR
 	and r4, r1, #3
 	adr r5, MC_put_o_16_arm_align_jt
-	add r5, r5, r4, lsl #2
-	ldr pc, [r5]
+	ldr r5, [r5, r4, lsl #2]
+	add pc, pc, r5
 
 MC_put_o_16_arm_align0:
 	ldmia r1, {r4-r7}
@@ -76,10 +76,10 @@
 	bne 1b
         ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
 MC_put_o_16_arm_align_jt:
-	.word MC_put_o_16_arm_align0
-	.word MC_put_o_16_arm_align1
-	.word MC_put_o_16_arm_align2
-	.word MC_put_o_16_arm_align3
+	.word MC_put_o_16_arm_align0-MC_put_o_16_arm_align0-8
+	.word MC_put_o_16_arm_align1-MC_put_o_16_arm_align0-8
+	.word MC_put_o_16_arm_align2-MC_put_o_16_arm_align0-8
+	.word MC_put_o_16_arm_align3-MC_put_o_16_arm_align0-8
 
 @ ----------------------------------------------------------------
 	.align
@@ -90,8 +90,8 @@
         stmfd sp!, {r4-r10, lr} @ R14 is also called LR
 	and r4, r1, #3
 	adr r5, MC_put_o_8_arm_align_jt
-	add r5, r5, r4, lsl #2
-	ldr pc, [r5]
+	ldr r5, [r5, r4, lsl #2]
+	add pc, pc, r5
 MC_put_o_8_arm_align0:
 	ldmia r1, {r4-r5}
 	add r1, r1, r2
@@ -134,10 +134,10 @@
         ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
 
 MC_put_o_8_arm_align_jt:
-	.word MC_put_o_8_arm_align0
-	.word MC_put_o_8_arm_align1
-	.word MC_put_o_8_arm_align2
-	.word MC_put_o_8_arm_align3
+	.word MC_put_o_8_arm_align0-MC_put_o_8_arm_align0-8
+	.word MC_put_o_8_arm_align1-MC_put_o_8_arm_align0-8
+	.word MC_put_o_8_arm_align2-MC_put_o_8_arm_align0-8
+	.word MC_put_o_8_arm_align3-MC_put_o_8_arm_align0-8
 
 @ ----------------------------------------------------------------
 .macro	AVG_PW rW1, rW2
@@ -162,7 +162,8 @@
 	ldr r11, [r5]
 	mvn r12, r11
 	add r5, r5, r4, lsl #2
-	ldr pc, [r5, #4]
+	ldr r5, [r5, #4]
+	add pc, pc, r5
 
 .macro	ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4
 	mov \R0, \R0, lsr #(\shift)
@@ -237,10 +238,10 @@
         ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
 MC_put_x_16_arm_align_jt:
 	.word 0x01010101
-	.word MC_put_x_16_arm_align0
-	.word MC_put_x_16_arm_align1
-	.word MC_put_x_16_arm_align2
-	.word MC_put_x_16_arm_align3
+	.word MC_put_x_16_arm_align0-MC_put_x_16_arm_align0-8
+	.word MC_put_x_16_arm_align1-MC_put_x_16_arm_align0-8
+	.word MC_put_x_16_arm_align2-MC_put_x_16_arm_align0-8
+	.word MC_put_x_16_arm_align3-MC_put_x_16_arm_align0-8
 
 @ ----------------------------------------------------------------
 	.align
@@ -254,7 +255,8 @@
 	ldr r11, [r5]
 	mvn r12, r11
 	add r5, r5, r4, lsl #2
-	ldr pc, [r5, #4]
+	ldr r5, [r5, #4]
+	add pc, pc, r5
 
 .macro	ADJ_ALIGN_DW shift, R0, R1, R2
 	mov \R0, \R0, lsr #(\shift)
@@ -317,7 +319,7 @@
         ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
 MC_put_x_8_arm_align_jt:
 	.word 0x01010101
-	.word MC_put_x_8_arm_align0
-	.word MC_put_x_8_arm_align1
-	.word MC_put_x_8_arm_align2
-	.word MC_put_x_8_arm_align3
+	.word MC_put_x_8_arm_align0-MC_put_x_8_arm_align0-8
+	.word MC_put_x_8_arm_align1-MC_put_x_8_arm_align0-8
+	.word MC_put_x_8_arm_align2-MC_put_x_8_arm_align0-8
+	.word MC_put_x_8_arm_align3-MC_put_x_8_arm_align0-8