[binutils/f20] Ignore extraneous whitespace in ARM assembler. Resolves: #1154176
Nicholas Clifton
nickc at fedoraproject.org
Mon Oct 20 13:47:18 UTC 2014
commit 5c017dd404bbbd5f0464094ec7fe02b3b9e44fa5
Author: Nick Clifton <nickc at redhat.com>
Date: Mon Oct 20 14:46:55 2014 +0100
Ignore extraneous whitespace in ARM assembler.
Resolves: #1154176
binutils-2.23.2-arm-gas-whitespace.patch | 141 ++++++++++++++++++++++++++++++
binutils.spec | 8 ++-
2 files changed, 148 insertions(+), 1 deletions(-)
---
diff --git a/binutils-2.23.2-arm-gas-whitespace.patch b/binutils-2.23.2-arm-gas-whitespace.patch
new file mode 100644
index 0000000..a439456
--- /dev/null
+++ b/binutils-2.23.2-arm-gas-whitespace.patch
@@ -0,0 +1,141 @@
+*** ../binutils-2.23.2.orig/gas/config/tc-arm.c 2014-10-20 14:30:44.307550085 +0100
+--- gas/config/tc-arm.c 2014-10-20 14:37:24.108406427 +0100
+*************** const char FLT_CHARS[] = "rRsSfFdDxXeEpP
+*** 885,890 ****
+--- 885,893 ----
+ static inline int
+ skip_past_char (char ** str, char c)
+ {
++ /* PR gas/14987: Allow for whitespace before the expected character. */
++ skip_whitespace (*str);
++
+ if (**str == c)
+ {
+ (*str)++;
+*************** arm_reg_parse_multi (char **ccp)
+*** 1154,1159 ****
+--- 1157,1164 ----
+ char *p;
+ struct reg_entry *reg;
+
++ skip_whitespace (start);
++
+ #ifdef REGISTER_PREFIX
+ if (*start != REGISTER_PREFIX)
+ return NULL;
+*************** parse_reg_list (char ** strp)
+*** 1579,1584 ****
+--- 1584,1591 ----
+ /* We come back here if we get ranges concatenated by '+' or '|'. */
+ do
+ {
++ skip_whitespace (str);
++
+ another_range = 0;
+
+ if (*str == '{')
+*************** parse_reg_list (char ** strp)
+*** 1632,1638 ****
+ || (in_range = 1, *str++ == '-'));
+ str--;
+
+! if (*str++ != '}')
+ {
+ first_error (_("missing `}'"));
+ return FAIL;
+--- 1639,1645 ----
+ || (in_range = 1, *str++ == '-'));
+ str--;
+
+! if (skip_past_char (&str, '}') == FAIL)
+ {
+ first_error (_("missing `}'"));
+ return FAIL;
+*************** parse_vfp_reg_list (char **ccp, unsigned
+*** 1730,1743 ****
+ unsigned long mask = 0;
+ int i;
+
+! if (*str != '{')
+ {
+ inst.error = _("expecting {");
+ return FAIL;
+ }
+
+- str++;
+-
+ switch (etype)
+ {
+ case REGLIST_VFP_S:
+--- 1737,1748 ----
+ unsigned long mask = 0;
+ int i;
+
+! if (skip_past_char (&str, '{') == FAIL)
+ {
+ inst.error = _("expecting {");
+ return FAIL;
+ }
+
+ switch (etype)
+ {
+ case REGLIST_VFP_S:
+*************** s_arm_unwind_save_mmxwr (void)
+*** 3928,3935 ****
+ }
+ while (skip_past_comma (&input_line_pointer) != FAIL);
+
+! if (*input_line_pointer == '}')
+! input_line_pointer++;
+
+ demand_empty_rest_of_line ();
+
+--- 3933,3939 ----
+ }
+ while (skip_past_comma (&input_line_pointer) != FAIL);
+
+! skip_past_char (&input_line_pointer, '}');
+
+ demand_empty_rest_of_line ();
+
+*************** s_arm_unwind_save_mmxwcg (void)
+*** 4026,4031 ****
+--- 4030,4037 ----
+ if (*input_line_pointer == '{')
+ input_line_pointer++;
+
++ skip_whitespace (input_line_pointer);
++
+ do
+ {
+ reg = arm_reg_parse (&input_line_pointer, REG_TYPE_MMXWCG);
+*************** s_arm_unwind_save_mmxwcg (void)
+*** 4061,4068 ****
+ }
+ while (skip_past_comma (&input_line_pointer) != FAIL);
+
+! if (*input_line_pointer == '}')
+! input_line_pointer++;
+
+ demand_empty_rest_of_line ();
+
+--- 4067,4073 ----
+ }
+ while (skip_past_comma (&input_line_pointer) != FAIL);
+
+! skip_past_char (&input_line_pointer, '}');
+
+ demand_empty_rest_of_line ();
+
+*************** parse_address_main (char **str, int i, i
+*** 5168,5173 ****
+--- 5173,5181 ----
+ return PARSE_OPERAND_SUCCESS;
+ }
+
++ /* PR gas/14887: Allow for whitespace after the opening bracket. */
++ skip_whitespace (p);
++
+ if ((reg = arm_reg_parse (&p, REG_TYPE_RN)) == FAIL)
+ {
+ inst.error = _(reg_expected_msgs[REG_TYPE_RN]);
diff --git a/binutils.spec b/binutils.spec
index 0af5c80..50c5156 100644
--- a/binutils.spec
+++ b/binutils.spec
@@ -27,7 +27,7 @@ Name: %{?cross}binutils%{?_with_debug:-debug}
# official binutils release happens (2.24.0) we will be able to restore
# Version to an honest value and everything will be good again.
Version: 2.23.88.0.1
-Release: 17%{?dist}
+Release: 18%{?dist}
License: GPLv3+
Group: Development/Tools
URL: http://sources.redhat.com/binutils
@@ -86,6 +86,8 @@ Patch25: binutils-2.23.2-i386-dis.patch
Patch26: binutils-2.23.2-DW_FORM_ref_addr.patch
# Fix detections of uncompressed .debug_str sections that look like they have been compressed.
Patch27: binutils-2.23.2-fake-zlib-sections.patch
+# Add support for ignoring whitespace in ARM assembler instructions.
+Patch28: binutils-2.23.2-arm-gas-whitespace.patch
Provides: bundled(libiberty)
@@ -218,6 +220,7 @@ using libelf instead of BFD.
%patch25 -p0 -b .i386-dis~
%patch26 -p0 -b .ref_addr~
%patch27 -p0 -b .fake-zlib~
+%patch28 -p0 -b .arm-whitespace~
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
@@ -523,6 +526,9 @@ exit 0
%endif # %{isnative}
%changelog
+* Mon Oct 20 2014 Nick Clifton <nickc at redhat.com> - 2.23.88.0.1-18
+- Ignore extraneous whitespace in ARM assembler. (#1154176)
+
* Mon Apr 28 2014 Nick Clifton <nickc at redhat.com> - 2.23.88.0.1-17
- Fix detection of uncompressed .debug_str sections. (#1082370)
More information about the scm-commits
mailing list