]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/glibc/glibc-2.2.5/glibc-2.2.5-mips-build-gmon.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / glibc / glibc-2.2.5 / glibc-2.2.5-mips-build-gmon.patch
1
2 #
3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4 #
5
6 --- glibc-2.2.5/sysdeps/mips/machine-gmon.h~glibc-2.2.5-mips-build-gmon.patch   2004-09-03 19:00:33.000000000 -0500
7 +++ glibc-2.2.5/sysdeps/mips/machine-gmon.h     2004-09-03 19:00:38.000000000 -0500
8 @@ -17,42 +17,52 @@
9     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
10     02111-1307 USA.  */
11  
12 -#define _MCOUNT_DECL static void __mcount
13 +#define _MCOUNT_DECL(frompc,selfpc) \
14 +static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
15  
16  /* Call __mcount with our the return PC for our caller,
17     and the return PC our caller will return to.  */
18  #ifdef __PIC__
19  #define CPLOAD ".cpload $25;"
20 +#define CPRESTORE ".cprestore 44\n\t"
21  #else
22  #define CPLOAD
23 +#define CPRESTORE
24  #endif
25  
26  #define MCOUNT asm(\
27 -       ".globl _mcount;" \
28 -       ".align 2;" \
29 -       ".type _mcount,@function;" \
30 -        "_mcount:;" \
31 -        ".set noreorder;" \
32 -        ".set noat;" \
33 +       ".globl _mcount;\n\t" \
34 +       ".align 2;\n\t" \
35 +       ".type _mcount,@function;\n\t" \
36 +       ".ent _mcount\n\t" \
37 +        "_mcount:\n\t" \
38 +        ".frame $sp,44,$31\n\t" \
39 +        ".set noreorder;\n\t" \
40 +        ".set noat;\n\t" \
41          CPLOAD \
42 -        "sw $4,8($29);" \
43 -        "sw $5,12($29);" \
44 -        "sw $6,16($29);" \
45 -        "sw $7,20($29);" \
46 -        "sw $1,0($29);" \
47 -        "sw $31,4($29);" \
48 -        "move $5,$31;" \
49 -        "move $4,$1;" \
50 -        "jal __mcount;" \
51 -       "nop;" \
52 -        "lw $4,8($29);" \
53 -        "lw $5,12($29);" \
54 -        "lw $6,16($29);" \
55 -        "lw $7,20($29);" \
56 -        "lw $31,4($29);" \
57 -        "lw $1,0($29);" \
58 -        "addu $29,$29,8;" \
59 -        "j $31;" \
60 -        "move $31,$1;" \
61 -        ".set reorder;" \
62 -        ".set at");
63 +       "subu $29,$29,48;\n\t" \
64 +       CPRESTORE \
65 +        "sw $4,24($29);\n\t" \
66 +        "sw $5,28($29);\n\t" \
67 +        "sw $6,32($29);\n\t" \
68 +        "sw $7,36($29);\n\t" \
69 +        "sw $2,40($29);\n\t" \
70 +        "sw $1,16($29);\n\t" \
71 +        "sw $31,20($29);\n\t" \
72 +        "move $5,$31;\n\t" \
73 +        "move $4,$1;\n\t" \
74 +        "jal __mcount;\n\t" \
75 +        "nop;\n\t" \
76 +        "lw $4,24($29);\n\t" \
77 +        "lw $5,28($29);\n\t" \
78 +        "lw $6,32($29);\n\t" \
79 +        "lw $7,36($29);\n\t" \
80 +        "lw $2,40($29);\n\t" \
81 +        "lw $31,20($29);\n\t" \
82 +        "lw $1,16($29);\n\t" \
83 +        "addu $29,$29,56;\n\t" \
84 +        "j $31;\n\t" \
85 +        "move $31,$1;\n\t" \
86 +        ".set reorder;\n\t" \
87 +        ".set at\n\t" \
88 +        ".end _mcount");