summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch76
1 files changed, 76 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch b/meta/recipes-devtools/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch
new file mode 100644
index 0000000000..0511c39dad
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch
@@ -0,0 +1,76 @@
1From 360ddc990a941bc506576f45a3858d38f508410b Mon Sep 17 00:00:00 2001
2From: Alan Modra <amodra@gmail.com>
3Date: Fri, 12 Sep 2014 09:46:30 +0930
4Subject: [PATCH] Fix tc-i386.c -Werror=logical-not-parentheses error
5
6 * config/tc-i386.c (match_template): Remove redundant "!!" testing
7 single-bit bitfields.
8 (build_modrm_byte): Don't compare single-bit bitfields to "1".
9
10Upstream commit:
11https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=ac4eb736520174305bf6e691827f7473b858cff1
12
13Manually resolved gas/ChangeLog conflict by placing the change at the
14top of the file.
15gas/config/tc-i386.c patched with offset
16
17Signed-off-by: George McCollister <george.mccollister@gmail.com>
18---
19 gas/ChangeLog | 6 ++++++
20 gas/config/tc-i386.c | 12 ++++++------
21 2 files changed, 12 insertions(+), 6 deletions(-)
22
23diff --git a/gas/ChangeLog b/gas/ChangeLog
24index 7fafa26..c6e60c9 100644
25--- a/gas/ChangeLog
26+++ b/gas/ChangeLog
27@@ -1,3 +1,9 @@
28+2014-09-12 Alan Modra <amodra@gmail.com>
29+
30+ * config/tc-i386.c (match_template): Remove redundant "!!" testing
31+ single-bit bitfields.
32+ (build_modrm_byte): Don't compare single-bit bitfields to "1".
33+
34 2013-11-18 H.J. Lu <hongjiu.lu@intel.com>
35
36 * config/tc-i386.c (lex_got): Add a dummy "int bnd_prefix"
37diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
38index 3c423da..4464091 100644
39--- a/gas/config/tc-i386.c
40+++ b/gas/config/tc-i386.c
41@@ -4672,9 +4672,9 @@ match_template (void)
42 && !operand_types[0].bitfield.regymm
43 && !operand_types[0].bitfield.regzmm)
44 || (!operand_types[t->operands > 1].bitfield.regmmx
45- && !!operand_types[t->operands > 1].bitfield.regxmm
46- && !!operand_types[t->operands > 1].bitfield.regymm
47- && !!operand_types[t->operands > 1].bitfield.regzmm))
48+ && operand_types[t->operands > 1].bitfield.regxmm
49+ && operand_types[t->operands > 1].bitfield.regymm
50+ && operand_types[t->operands > 1].bitfield.regzmm))
51 && (t->base_opcode != 0x0fc7
52 || t->extension_opcode != 1 /* cmpxchg8b */))
53 continue;
54@@ -4689,7 +4689,7 @@ match_template (void)
55 && ((!operand_types[0].bitfield.regmmx
56 && !operand_types[0].bitfield.regxmm)
57 || (!operand_types[t->operands > 1].bitfield.regmmx
58- && !!operand_types[t->operands > 1].bitfield.regxmm)))
59+ && operand_types[t->operands > 1].bitfield.regxmm)))
60 continue;
61
62 /* Do not verify operands when there are none. */
63@@ -6139,8 +6139,8 @@ build_modrm_byte (void)
64 op = i.tm.operand_types[vvvv];
65 op.bitfield.regmem = 0;
66 if ((dest + 1) >= i.operands
67- || (op.bitfield.reg32 != 1
68- && !op.bitfield.reg64 != 1
69+ || (!op.bitfield.reg32
70+ && op.bitfield.reg64
71 && !operand_type_equal (&op, &regxmm)
72 && !operand_type_equal (&op, &regymm)
73 && !operand_type_equal (&op, &regzmm)
74--
752.4.3
76