summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorZhenhua Luo <zhenhua.luo@freescale.com>2013-06-03 12:23:03 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-03 16:47:40 +0100
commit14010b4a60072641bab62c761edffc51148ae6e9 (patch)
tree74f9a34e6f94caed8a9f91950f532073820137e1 /meta
parent66dfd49b868cc9a73ee688d6173e4f2a9c3cf4d8 (diff)
downloadpoky-14010b4a60072641bab62c761edffc51148ae6e9.tar.gz
binutils: fix compile error of complex expressions before @l/@h
Back port two patches to fix the error of complex expressions before @l/@h. Error sample: test.s: Assembler messages: test.s:1: Error: operand out of range (0xffffffffffff8000 is not between 0x0000000000000000 and 0x000000000000ffff) Fix Bug 4524. (From OE-Core rev: 9ba812ab1f613d28f9eb3192d2ff1a34dfce33e4) Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2.inc4
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-PPC_VLE_SPLIT16A-Delete-unused-macro.patch122
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-config-tc-ppc.c-md_apply_fix-Sign-extend-fieldval-un.patch85
3 files changed, 210 insertions, 1 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2.inc b/meta/recipes-devtools/binutils/binutils-2.23.2.inc
index abec597507..f5b5a99a46 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.2.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2.inc
@@ -1,4 +1,4 @@
1PR = "r3" 1PR = "r4"
2 2
3LIC_FILES_CHKSUM="\ 3LIC_FILES_CHKSUM="\
4 file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\ 4 file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\
@@ -41,6 +41,8 @@ BACKPORT = "\
41 file://backport/binutils-fix-skip-whitespace-pr14887.patch \ 41 file://backport/binutils-fix-skip-whitespace-pr14887.patch \
42 file://backport/aarch64-crn.patch \ 42 file://backport/aarch64-crn.patch \
43 file://backport/aarch64-movi.patch \ 43 file://backport/aarch64-movi.patch \
44 file://backport/0001-config-tc-ppc.c-PPC_VLE_SPLIT16A-Delete-unused-macro.patch \
45 file://backport/0002-config-tc-ppc.c-md_apply_fix-Sign-extend-fieldval-un.patch \
44" 46"
45SRC_URI[md5sum] = "4f8fa651e35ef262edc01d60fb45702e" 47SRC_URI[md5sum] = "4f8fa651e35ef262edc01d60fb45702e"
46SRC_URI[sha256sum] = "fe914e56fed7a9ec2eb45274b1f2e14b0d8b4f41906a5194eac6883cfe5c1097" 48SRC_URI[sha256sum] = "fe914e56fed7a9ec2eb45274b1f2e14b0d8b4f41906a5194eac6883cfe5c1097"
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-PPC_VLE_SPLIT16A-Delete-unused-macro.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-PPC_VLE_SPLIT16A-Delete-unused-macro.patch
new file mode 100644
index 0000000000..6057ad5717
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-PPC_VLE_SPLIT16A-Delete-unused-macro.patch
@@ -0,0 +1,122 @@
1config/tc-ppc.c (PPC_VLE_SPLIT16A): Delete unused macro.
2 (PPC_VLE_SPLIT16D, PPC_VLE_LO16A, PPC_VLE_LO16D):
3 Likewise. (PPC_VLE_HI16A, PPC_VLE_HI16D):
4 Likewise. (PPC_VLE_HA16A, PPC_VLE_HA16D):
5 Likewise. (md_apply_fix):
6 Set fx_no_overflow for assorted relocations.
7 Shift and sign-extend fieldval for use by some VLE reloc
8 operand->insert functions.
9
10Upstream-Status: Backport
11
12Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
13
14commit ee75ce72fd7a4b2dc47db46acc36905da8904be4
15Author: Alan Modra <amodra@bigpond.net.au>
16Date: Mon May 6 23:36:48 2013 +0000
17
18--- binutils-2.23.2/gas/config/tc-ppc.c.orig 2013-06-02 21:44:34.000000000 -0500
19+++ binutils-2.23.2/gas/config/tc-ppc.c 2013-06-02 21:51:37.000000000 -0500
20@@ -64,40 +64,14 @@
21 /* #lo(value) denotes the least significant 16 bits of the indicated. */
22 #define PPC_LO(v) ((v) & 0xffff)
23
24-/* Split the indicated value with the msbs in bits 11-15
25- and the lsbs in bits 21-31. */
26-#define PPC_VLE_SPLIT16A(v) ((v & 0xf800) << 11) | (v & 0x7ff)
27-
28-/* Split the indicated value with the msbs in bits 6-10
29- and the lsbs in bits 21-31. */
30-#define PPC_VLE_SPLIT16D(v) ((v & 0xf800) << 5) | (v & 0x7ff)
31-
32-/* #lo(value) denotes the lsb 16 bits in split16a format. */
33-#define PPC_VLE_LO16A(v) PPC_VLE_SPLIT16A(PPC_LO(v))
34-
35-/* #lo(value) denotes the lsb 16 bits in split16d format. */
36-#define PPC_VLE_LO16D(v) PPC_VLE_SPLIT16D(PPC_LO(v))
37-
38 /* #hi(value) denotes bits 16 through 31 of the indicated value. */
39 #define PPC_HI(v) (((v) >> 16) & 0xffff)
40
41-/* #lo(value) denotes the msb 16 bits in split16a format. */
42-#define PPC_VLE_HI16A(v) PPC_VLE_SPLIT16A(PPC_HI(v))
43-
44-/* #lo(value) denotes the msb 16 bits in split16d format. */
45-#define PPC_VLE_HI16D(v) PPC_VLE_SPLIT16D(PPC_HI(v))
46-
47 /* #ha(value) denotes the high adjusted value: bits 16 through 31 of
48 the indicated value, compensating for #lo() being treated as a
49 signed number. */
50 #define PPC_HA(v) PPC_HI ((v) + 0x8000)
51
52-/* #ha(value) denotes the high adjusted value in split16a format. */
53-#define PPC_VLE_HA16A(v) PPC_VLE_SPLIT16A(PPC_HA(v))
54-
55-/* #ha(value) denotes the high adjusted value in split16d format. */
56-#define PPC_VLE_HA16D(v) PPC_VLE_SPLIT16D(PPC_HA(v))
57-
58 /* #higher(value) denotes bits 32 through 47 of the indicated value. */
59 #define PPC_HIGHER(v) (((v) >> 16 >> 16) & 0xffff)
60
61@@ -6379,7 +6353,10 @@
62 fixP->fx_r_type = BFD_RELOC_LO16_PCREL;
63 /* fall through */
64 case BFD_RELOC_LO16_PCREL:
65+ case BFD_RELOC_PPC_VLE_LO16A:
66+ case BFD_RELOC_PPC_VLE_LO16D:
67 fieldval = SEX16 (value);
68+ fixP->fx_no_overflow = 1;
69 break;
70
71 case BFD_RELOC_HI16:
72@@ -6387,7 +6364,10 @@
73 fixP->fx_r_type = BFD_RELOC_HI16_PCREL;
74 /* fall through */
75 case BFD_RELOC_HI16_PCREL:
76+ case BFD_RELOC_PPC_VLE_HI16A:
77+ case BFD_RELOC_PPC_VLE_HI16D:
78 fieldval = SEX16 (PPC_HI (value));
79+ fixP->fx_no_overflow = 1;
80 break;
81
82 case BFD_RELOC_HI16_S:
83@@ -6395,7 +6375,10 @@
84 fixP->fx_r_type = BFD_RELOC_HI16_S_PCREL;
85 /* fall through */
86 case BFD_RELOC_HI16_S_PCREL:
87+ case BFD_RELOC_PPC_VLE_HA16A:
88+ case BFD_RELOC_PPC_VLE_HA16D:
89 fieldval = SEX16 (PPC_HA (value));
90+ fixP->fx_no_overflow = 1;
91 break;
92
93 #ifdef OBJ_ELF
94@@ -6403,24 +6386,28 @@
95 if (fixP->fx_pcrel)
96 goto bad_pcrel;
97 fieldval = SEX16 (PPC_HIGHER (value));
98+ fixP->fx_no_overflow = 1;
99 break;
100
101 case BFD_RELOC_PPC64_HIGHER_S:
102 if (fixP->fx_pcrel)
103 goto bad_pcrel;
104 fieldval = SEX16 (PPC_HIGHERA (value));
105+ fixP->fx_no_overflow = 1;
106 break;
107
108 case BFD_RELOC_PPC64_HIGHEST:
109 if (fixP->fx_pcrel)
110 goto bad_pcrel;
111 fieldval = SEX16 (PPC_HIGHEST (value));
112+ fixP->fx_no_overflow = 1;
113 break;
114
115 case BFD_RELOC_PPC64_HIGHEST_S:
116 if (fixP->fx_pcrel)
117 goto bad_pcrel;
118 fieldval = SEX16 (PPC_HIGHESTA (value));
119+ fixP->fx_no_overflow = 1;
120 break;
121
122 /* The following relocs can't be calculated by the assembler.
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-config-tc-ppc.c-md_apply_fix-Sign-extend-fieldval-un.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-config-tc-ppc.c-md_apply_fix-Sign-extend-fieldval-un.patch
new file mode 100644
index 0000000000..a62ca4704a
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-config-tc-ppc.c-md_apply_fix-Sign-extend-fieldval-un.patch
@@ -0,0 +1,85 @@
1config/tc-ppc.c (md_apply_fix): Sign extend fieldval under control of operand flag bits.
2
3Upstream-Status: Backport
4
5Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
6
7commit cf5434698882f41ddfcc469488e8a68c674aae03
8Author: Alan Modra <amodra@bigpond.net.au>
9Date: Thu May 9 04:01:53 2013 +0000
10
11--- binutils-2.23.2/gas/config/tc-ppc.c.orig 2013-06-02 21:53:24.000000000 -0500
12+++ binutils-2.23.2/gas/config/tc-ppc.c 2013-06-02 22:03:00.000000000 -0500
13@@ -6355,7 +6355,10 @@
14 case BFD_RELOC_LO16_PCREL:
15 case BFD_RELOC_PPC_VLE_LO16A:
16 case BFD_RELOC_PPC_VLE_LO16D:
17- fieldval = SEX16 (value);
18+ fieldval = value & 0xffff;
19+ sign_extend_16:
20+ if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
21+ fieldval = (fieldval ^ 0x8000) - 0x8000;
22 fixP->fx_no_overflow = 1;
23 break;
24
25@@ -6366,9 +6369,8 @@
26 case BFD_RELOC_HI16_PCREL:
27 case BFD_RELOC_PPC_VLE_HI16A:
28 case BFD_RELOC_PPC_VLE_HI16D:
29- fieldval = SEX16 (PPC_HI (value));
30- fixP->fx_no_overflow = 1;
31- break;
32+ fieldval = PPC_HI (value);
33+ goto sign_extend_16;
34
35 case BFD_RELOC_HI16_S:
36 if (fixP->fx_pcrel)
37@@ -6377,38 +6379,33 @@
38 case BFD_RELOC_HI16_S_PCREL:
39 case BFD_RELOC_PPC_VLE_HA16A:
40 case BFD_RELOC_PPC_VLE_HA16D:
41- fieldval = SEX16 (PPC_HA (value));
42- fixP->fx_no_overflow = 1;
43- break;
44+ fieldval = PPC_HA (value);
45+ goto sign_extend_16;
46
47 #ifdef OBJ_ELF
48 case BFD_RELOC_PPC64_HIGHER:
49 if (fixP->fx_pcrel)
50 goto bad_pcrel;
51- fieldval = SEX16 (PPC_HIGHER (value));
52- fixP->fx_no_overflow = 1;
53- break;
54+ fieldval = PPC_HIGHER (value);
55+ goto sign_extend_16;
56
57 case BFD_RELOC_PPC64_HIGHER_S:
58 if (fixP->fx_pcrel)
59 goto bad_pcrel;
60- fieldval = SEX16 (PPC_HIGHERA (value));
61- fixP->fx_no_overflow = 1;
62- break;
63+ fieldval = PPC_HIGHERA (value);
64+ goto sign_extend_16;
65
66 case BFD_RELOC_PPC64_HIGHEST:
67 if (fixP->fx_pcrel)
68 goto bad_pcrel;
69- fieldval = SEX16 (PPC_HIGHEST (value));
70- fixP->fx_no_overflow = 1;
71- break;
72+ fieldval = PPC_HIGHEST (value);
73+ goto sign_extend_16;
74
75 case BFD_RELOC_PPC64_HIGHEST_S:
76 if (fixP->fx_pcrel)
77 goto bad_pcrel;
78- fieldval = SEX16 (PPC_HIGHESTA (value));
79- fixP->fx_no_overflow = 1;
80- break;
81+ fieldval = PPC_HIGHESTA (value);
82+ goto sign_extend_16;
83
84 /* The following relocs can't be calculated by the assembler.
85 Leave the field zero. */