diff options
Diffstat (limited to 'recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99355.patch')
-rw-r--r-- | recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99355.patch | 181 |
1 files changed, 181 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99355.patch b/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99355.patch new file mode 100644 index 0000000000..b47c2ceb4c --- /dev/null +++ b/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99355.patch | |||
@@ -0,0 +1,181 @@ | |||
1 | 2010-04-12 Andrew Stubbs <ams@codesourcery.com> | ||
2 | |||
3 | Issue #7178 | ||
4 | |||
5 | gcc/ | ||
6 | * config/arm/arm.c (arm_init_libfuncs): Change __gnu_f2h_ieee to | ||
7 | __aeabi_f2h, __gnu_f2h_alternative to __aeabi_f2h_alt, __gnu_h2f_ieee | ||
8 | to __aeabi_h2f, and __gnu_h2f_alternative to __aeabi_h2f_alt. | ||
9 | * config/arm/fp16.c (__gnu_f2h_internal): Change return type to | ||
10 | unsigned int. Change 'sign' variable likewise. | ||
11 | (__gnu_h2f_internal): Set to static inline. | ||
12 | Change return type to unsigned int. Change 'sign' variable likewise. | ||
13 | (ALIAS): New define. | ||
14 | (__gnu_f2h_ieee): Change unsigned short to unsigned int. | ||
15 | (__gnu_h2f_ieee): Likewise. | ||
16 | (__gnu_f2h_alternative): Likewise. | ||
17 | (__gnu_h2f_alternative): Likewise. | ||
18 | (__aeabi_f2h, __aeabi_h2f): New aliases. | ||
19 | (__aeabi_f2h_alt, __aeabi_h2f_alt): Likewise. | ||
20 | * config/arm/sfp-machine.h (__extendhfsf2): Set to __aeabi_h2f. | ||
21 | (__truncsfhf2): Set to __aeabi_f2h. | ||
22 | |||
23 | gcc/testsuite/ | ||
24 | * g++.dg/ext/arm-fp16/arm-fp16-ops-5.C: Check for __aeabi_h2f | ||
25 | and __aeabi_f2h. | ||
26 | * g++.dg/ext/arm-fp16/arm-fp16-ops-6.C: Likewise. | ||
27 | * gcc.dg/torture/arm-fp16-ops-5.c: Likewise. | ||
28 | * gcc.dg/torture/arm-fp16-ops-6.c: Likewise. | ||
29 | |||
30 | 2010-07-26 Julian Brown <julian@codesourcery.com> | ||
31 | |||
32 | Merge from Sourcery G++ 4.4: | ||
33 | |||
34 | Richard Earnshaw <rearnsha@arm.com> | ||
35 | |||
36 | gcc/ | ||
37 | |||
38 | === modified file 'gcc/config/arm/arm.c' | ||
39 | --- old/gcc/config/arm/arm.c 2010-08-13 11:02:47 +0000 | ||
40 | +++ new/gcc/config/arm/arm.c 2010-08-13 14:08:20 +0000 | ||
41 | @@ -1054,12 +1054,12 @@ | ||
42 | /* Conversions. */ | ||
43 | set_conv_libfunc (trunc_optab, HFmode, SFmode, | ||
44 | (arm_fp16_format == ARM_FP16_FORMAT_IEEE | ||
45 | - ? "__gnu_f2h_ieee" | ||
46 | - : "__gnu_f2h_alternative")); | ||
47 | + ? "__aeabi_f2h" | ||
48 | + : "__aeabi_f2h_alt")); | ||
49 | set_conv_libfunc (sext_optab, SFmode, HFmode, | ||
50 | (arm_fp16_format == ARM_FP16_FORMAT_IEEE | ||
51 | - ? "__gnu_h2f_ieee" | ||
52 | - : "__gnu_h2f_alternative")); | ||
53 | + ? "__aeabi_h2f" | ||
54 | + : "__aeabi_h2f_alt")); | ||
55 | |||
56 | /* Arithmetic. */ | ||
57 | set_optab_libfunc (add_optab, HFmode, NULL); | ||
58 | |||
59 | === modified file 'gcc/config/arm/fp16.c' | ||
60 | --- old/gcc/config/arm/fp16.c 2009-06-18 11:26:37 +0000 | ||
61 | +++ new/gcc/config/arm/fp16.c 2010-08-13 14:08:20 +0000 | ||
62 | @@ -22,10 +22,10 @@ | ||
63 | see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
64 | <http://www.gnu.org/licenses/>. */ | ||
65 | |||
66 | -static inline unsigned short | ||
67 | +static inline unsigned int | ||
68 | __gnu_f2h_internal(unsigned int a, int ieee) | ||
69 | { | ||
70 | - unsigned short sign = (a >> 16) & 0x8000; | ||
71 | + unsigned int sign = (a >> 16) & 0x8000; | ||
72 | int aexp = (a >> 23) & 0xff; | ||
73 | unsigned int mantissa = a & 0x007fffff; | ||
74 | unsigned int mask; | ||
75 | @@ -95,10 +95,10 @@ | ||
76 | return sign | (((aexp + 14) << 10) + (mantissa >> 13)); | ||
77 | } | ||
78 | |||
79 | -unsigned int | ||
80 | -__gnu_h2f_internal(unsigned short a, int ieee) | ||
81 | +static inline unsigned int | ||
82 | +__gnu_h2f_internal(unsigned int a, int ieee) | ||
83 | { | ||
84 | - unsigned int sign = (unsigned int)(a & 0x8000) << 16; | ||
85 | + unsigned int sign = (a & 0x00008000) << 16; | ||
86 | int aexp = (a >> 10) & 0x1f; | ||
87 | unsigned int mantissa = a & 0x3ff; | ||
88 | |||
89 | @@ -120,26 +120,33 @@ | ||
90 | return sign | (((aexp + 0x70) << 23) + (mantissa << 13)); | ||
91 | } | ||
92 | |||
93 | -unsigned short | ||
94 | +#define ALIAS(src, dst) \ | ||
95 | + typeof (src) dst __attribute__ ((alias (#src))); | ||
96 | + | ||
97 | +unsigned int | ||
98 | __gnu_f2h_ieee(unsigned int a) | ||
99 | { | ||
100 | return __gnu_f2h_internal(a, 1); | ||
101 | } | ||
102 | +ALIAS (__gnu_f2h_ieee, __aeabi_f2h) | ||
103 | |||
104 | unsigned int | ||
105 | -__gnu_h2f_ieee(unsigned short a) | ||
106 | +__gnu_h2f_ieee(unsigned int a) | ||
107 | { | ||
108 | return __gnu_h2f_internal(a, 1); | ||
109 | } | ||
110 | +ALIAS (__gnu_h2f_ieee, __aeabi_h2f) | ||
111 | |||
112 | -unsigned short | ||
113 | +unsigned int | ||
114 | __gnu_f2h_alternative(unsigned int x) | ||
115 | { | ||
116 | return __gnu_f2h_internal(x, 0); | ||
117 | } | ||
118 | +ALIAS (__gnu_f2h_alternative, __aeabi_f2h_alt) | ||
119 | |||
120 | unsigned int | ||
121 | -__gnu_h2f_alternative(unsigned short a) | ||
122 | +__gnu_h2f_alternative(unsigned int a) | ||
123 | { | ||
124 | return __gnu_h2f_internal(a, 0); | ||
125 | } | ||
126 | +ALIAS (__gnu_h2f_alternative, __aeabi_h2f_alt) | ||
127 | |||
128 | === modified file 'gcc/config/arm/sfp-machine.h' | ||
129 | --- old/gcc/config/arm/sfp-machine.h 2009-06-18 11:26:37 +0000 | ||
130 | +++ new/gcc/config/arm/sfp-machine.h 2010-08-13 14:08:20 +0000 | ||
131 | @@ -99,7 +99,7 @@ | ||
132 | #define __fixdfdi __aeabi_d2lz | ||
133 | #define __fixunsdfdi __aeabi_d2ulz | ||
134 | #define __floatdidf __aeabi_l2d | ||
135 | -#define __extendhfsf2 __gnu_h2f_ieee | ||
136 | -#define __truncsfhf2 __gnu_f2h_ieee | ||
137 | +#define __extendhfsf2 __aeabi_h2f | ||
138 | +#define __truncsfhf2 __aeabi_f2h | ||
139 | |||
140 | #endif /* __ARM_EABI__ */ | ||
141 | |||
142 | === modified file 'gcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-5.C' | ||
143 | --- old/gcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-5.C 2010-07-29 15:38:15 +0000 | ||
144 | +++ new/gcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-5.C 2010-08-13 14:08:20 +0000 | ||
145 | @@ -13,3 +13,5 @@ | ||
146 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_h\[a-z\]*_ieee" } } */ | ||
147 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_h2f_ieee" } } */ | ||
148 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_f2h_ieee" } } */ | ||
149 | +/* { dg-final { scan-assembler-not "\tbl\t__aeabi_h2f" } } */ | ||
150 | +/* { dg-final { scan-assembler-not "\tbl\t__aeabi_f2h" } } */ | ||
151 | |||
152 | === modified file 'gcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-6.C' | ||
153 | --- old/gcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-6.C 2010-07-29 15:38:15 +0000 | ||
154 | +++ new/gcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-6.C 2010-08-13 14:08:20 +0000 | ||
155 | @@ -13,3 +13,5 @@ | ||
156 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_h\[a-z\]*_ieee" } } */ | ||
157 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_h2f_ieee" } } */ | ||
158 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_f2h_ieee" } } */ | ||
159 | +/* { dg-final { scan-assembler-not "\tbl\t__aeabi_h2f" } } */ | ||
160 | +/* { dg-final { scan-assembler-not "\tbl\t__aeabi_f2h" } } */ | ||
161 | |||
162 | === modified file 'gcc/testsuite/gcc.dg/torture/arm-fp16-ops-5.c' | ||
163 | --- old/gcc/testsuite/gcc.dg/torture/arm-fp16-ops-5.c 2010-07-29 15:38:15 +0000 | ||
164 | +++ new/gcc/testsuite/gcc.dg/torture/arm-fp16-ops-5.c 2010-08-13 14:08:20 +0000 | ||
165 | @@ -13,3 +13,5 @@ | ||
166 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_h\[a-z\]*_ieee" } } */ | ||
167 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_h2f_ieee" } } */ | ||
168 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_f2h_ieee" } } */ | ||
169 | +/* { dg-final { scan-assembler-not "\tbl\t__aeabi_h2f" } } */ | ||
170 | +/* { dg-final { scan-assembler-not "\tbl\t__aeabi_f2h" } } */ | ||
171 | |||
172 | === modified file 'gcc/testsuite/gcc.dg/torture/arm-fp16-ops-6.c' | ||
173 | --- old/gcc/testsuite/gcc.dg/torture/arm-fp16-ops-6.c 2010-07-29 15:38:15 +0000 | ||
174 | +++ new/gcc/testsuite/gcc.dg/torture/arm-fp16-ops-6.c 2010-08-13 14:08:20 +0000 | ||
175 | @@ -13,3 +13,5 @@ | ||
176 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_h\[a-z\]*_ieee" } } */ | ||
177 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_h2f_ieee" } } */ | ||
178 | /* { dg-final { scan-assembler-not "\tbl\t__gnu_f2h_ieee" } } */ | ||
179 | +/* { dg-final { scan-assembler-not "\tbl\t__aeabi_h2f" } } */ | ||
180 | +/* { dg-final { scan-assembler-not "\tbl\t__aeabi_f2h" } } */ | ||
181 | |||