summaryrefslogtreecommitdiff
path: root/user/libmpeg2/arm-textrel.patch
blob: 0a75cebfbc7e461bb9d421520a6dcd5ef82d4f9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
--- 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