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
|
$NetBSD: patch-ab,v 1.4 2001/03/25 12:51:25 simonb Exp $
This patch should be in the next madplay release and can be
deleted then - simonb (20010325).
--- libmad/imdct_l_arm.S.orig Mon Sep 25 04:49:38 2000
+++ libmad/imdct_l_arm.S Sun Mar 25 19:02:43 2001
@@ -1,5 +1,5 @@
/*****************************************************************************
-* Copyright (C) 2000 Andre McCurdy <armccurdy@yahoo.co.uk>
+* Copyright (C) 2000-2001 Andre McCurdy <armccurdy@yahoo.co.uk>
*
* This program is free software. you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,4 +26,7 @@
*
+* 2001/03/24: Andre McCurdy <armccurdy@yahoo.co.uk>
+* - Corrected PIC unsafe loading of address of 'imdct36_long_karray'
+*
* 2000/09/20: Robert Leslie <rob@mars.org>
* - Added a global symbol with leading underscore per suggestion of
* Simon Burge to support linking with the a.out format.
@@ -465,7 +468,7 @@
@----
- ldr r2, =imdct36_long_karray @ base address of Knn array
+ add r2, pc, #(imdct36_long_karray-.-8) @ r2 = base address of Knn array (PIC safe ?)
loop:
@@ -515,12 +518,29 @@
movs r8, r8, lsl #8 @ push result location index off the top end
beq loop @ loop back if completion flag not set
+ b imdct_l_windowing @ branch to windowing stage if looping finished
+
+imdct36_long_karray:
+
+ .word K17, -K13, K10, -K06, -K05, K01, -K00, K04, -K07, K11, K12, -K16, 0x00000000
+ .word K13, K07, K16, K01, K10, -K05, K04, -K11, K00, -K17, K06, -K12, 0x00200800
+ .word K11, K17, K05, K12, -K01, K06, -K07, K00, -K13, K04, -K16, K10, 0x00200c00
+ .word K07, K00, -K12, K05, -K16, -K10, K11, -K17, K04, K13, K01, K06, 0x00001400
+ .word K05, K10, -K00, -K17, K07, -K13, K12, K06, -K16, K01, -K11, -K04, 0x00181800
+ .word K01, K05, -K07, -K11, K13, K17, -K16, -K12, K10, K06, -K04, -K00, 0x00102000
+ .word -K16, K12, -K11, K07, K04, -K00, -K01, K05, -K06, K10, K13, -K17, 0x00284800
+ .word -K12, K06, K17, -K00, -K11, K04, K05, -K10, K01, K16, -K07, -K13, 0x00085000
+ .word -K10, K16, K04, -K13, -K00, K07, K06, -K01, -K12, -K05, K17, K11, 0x00105400
+ .word -K06, -K01, K13, K04, K17, -K11, -K10, -K16, -K05, K12, K00, K07, 0x00185c00
+ .word -K04, -K11, -K01, K16, K06, K12, K13, -K07, -K17, -K00, -K10, -K05, 0x00006000
+ .word -K00, -K04, -K06, -K10, -K12, -K16, -K17, -K13, -K11, -K07, -K05, -K01, 0x00206801
@----
@-------------------------------------------------------------------------
@----
+imdct_l_windowing:
ldr r11, [sp, #80] @ fetch function parameter 3 from out of the stack
ldmia r1!, { r0, r2 - r9 } @ load 9 words from x0, update pointer
@@ -973,24 +993,6 @@
add sp, sp, #(21*4) @ return stack frame
ldmia sp!, { r4 - r11, pc } @ restore callee saved regs, and return
-
- @----
-
-
-imdct36_long_karray:
-
- .word K17, -K13, K10, -K06, -K05, K01, -K00, K04, -K07, K11, K12, -K16, 0x00000000
- .word K13, K07, K16, K01, K10, -K05, K04, -K11, K00, -K17, K06, -K12, 0x00200800
- .word K11, K17, K05, K12, -K01, K06, -K07, K00, -K13, K04, -K16, K10, 0x00200c00
- .word K07, K00, -K12, K05, -K16, -K10, K11, -K17, K04, K13, K01, K06, 0x00001400
- .word K05, K10, -K00, -K17, K07, -K13, K12, K06, -K16, K01, -K11, -K04, 0x00181800
- .word K01, K05, -K07, -K11, K13, K17, -K16, -K12, K10, K06, -K04, -K00, 0x00102000
- .word -K16, K12, -K11, K07, K04, -K00, -K01, K05, -K06, K10, K13, -K17, 0x00284800
- .word -K12, K06, K17, -K00, -K11, K04, K05, -K10, K01, K16, -K07, -K13, 0x00085000
- .word -K10, K16, K04, -K13, -K00, K07, K06, -K01, -K12, -K05, K17, K11, 0x00105400
- .word -K06, -K01, K13, K04, K17, -K11, -K10, -K16, -K05, K12, K00, K07, 0x00185c00
- .word -K04, -K11, -K01, K16, K06, K12, K13, -K07, -K17, -K00, -K10, -K05, 0x00006000
- .word -K00, -K04, -K06, -K10, -K12, -K16, -K17, -K13, -K11, -K07, -K05, -K01, 0x00206801
@----
@END
|