dhowells pushed to cross-binutils (f22). "Microblaze: Fix extra-large constant handling [binutils bz 18189]."
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue Apr 7 08:41:15 UTC 2015
>From bccbf073593f47b0548b232b72465e9d6748ad6b Mon Sep 17 00:00:00 2001
From: David Howells <dhowells at redhat.com>
Date: Mon, 6 Apr 2015 20:01:17 +0100
Subject: Microblaze: Fix extra-large constant handling [binutils bz 18189].
diff --git a/cross-binutils-2.25-fixup-microblaze.patch b/cross-binutils-2.25-fixup-microblaze.patch
new file mode 100644
index 0000000..ae79fa2
--- /dev/null
+++ b/cross-binutils-2.25-fixup-microblaze.patch
@@ -0,0 +1,75 @@
+commit 03e080386e266243b2af667af026b992822085cd
+Author: Nick Clifton <nickc at redhat.com>
+Date: Thu Apr 2 16:10:06 2015 +0100
+
+ Fixes a bug in the microblaze assembler where it would not complain about constants larger than 32-bits.
+
+ PR gas/18189
+ * config/tc-microblaze.c (parse_imm): Use offsetT as the type for
+ min and max parameters.
+
+diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
+index bdf25c2..6f0e795 100644
+--- a/gas/config/tc-microblaze.c
++++ b/gas/config/tc-microblaze.c
+@@ -685,7 +685,7 @@ static symbolS * GOT_symbol;
+ #define GOT_SYMBOL_NAME "_GLOBAL_OFFSET_TABLE_"
+
+ static char *
+-parse_imm (char * s, expressionS * e, int min, int max)
++parse_imm (char * s, expressionS * e, offsetT min, offsetT max)
+ {
+ char *new_pointer;
+ char *atp;
+@@ -736,11 +736,11 @@ parse_imm (char * s, expressionS * e, int min, int max)
+ ; /* An error message has already been emitted. */
+ else if ((e->X_op != O_constant && e->X_op != O_symbol) )
+ as_fatal (_("operand must be a constant or a label"));
+- else if ((e->X_op == O_constant) && ((int) e->X_add_number < min
+- || (int) e->X_add_number > max))
++ else if ((e->X_op == O_constant) && (e->X_add_number < min
++ || e->X_add_number > max))
+ {
+- as_fatal (_("operand must be absolute in range %d..%d, not %d"),
+- min, max, (int) e->X_add_number);
++ as_fatal (_("operand must be absolute in range %lx..%lx, not %lx"),
++ (long) min, (long) max, (long) e->X_add_number);
+ }
+
+ if (atp)
+commit f66adc4eada1884cef90aa978561b9b2008cdaf2
+Author: Nick Clifton <nickc at redhat.com>
+Date: Thu Apr 2 17:13:12 2015 +0100
+
+ Second fix for microblaze gas port's ability to parse constants.
+
+ PR gas/18189
+ * config/tc-microblaze.c (parse_imm): Use offsetT as the type for
+ min and max parameters. Sign extend values before testing.
+
+diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
+index 6f0e795..3309e59 100644
+--- a/gas/config/tc-microblaze.c
++++ b/gas/config/tc-microblaze.c
+@@ -736,11 +736,17 @@ parse_imm (char * s, expressionS * e, offsetT min, offsetT max)
+ ; /* An error message has already been emitted. */
+ else if ((e->X_op != O_constant && e->X_op != O_symbol) )
+ as_fatal (_("operand must be a constant or a label"));
+- else if ((e->X_op == O_constant) && (e->X_add_number < min
+- || e->X_add_number > max))
++ else if (e->X_op == O_constant)
+ {
+- as_fatal (_("operand must be absolute in range %lx..%lx, not %lx"),
+- (long) min, (long) max, (long) e->X_add_number);
++ /* Special case: sign extend negative 32-bit values to 64-bits. */
++ if ((e->X_add_number >> 31) == 1)
++ e->X_add_number |= (-1 << 31);
++
++ if (e->X_add_number < min || e->X_add_number > max)
++ {
++ as_fatal (_("operand must be absolute in range %lx..%lx, not %lx"),
++ (long) min, (long) max, (long) e->X_add_number);
++ }
+ }
+
+ if (atp)
diff --git a/cross-binutils.spec b/cross-binutils.spec
index 5e40f4b..d17c93c 100644
--- a/cross-binutils.spec
+++ b/cross-binutils.spec
@@ -48,7 +48,7 @@
Summary: A GNU collection of cross-compilation binary utilities
Name: %{cross}-binutils
Version: 2.25
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv3+
Group: Development/Tools
URL: http://sources.redhat.com/binutils
@@ -87,6 +87,7 @@ Patch14: binutils-2.24-ldforcele.patch
# Fix formatless sprintfs in Score-specific code.
Patch100: cross-binutils-2.25-fixup-for-sh64.patch
+Patch101: cross-binutils-2.25-fixup-microblaze.patch
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: texinfo >= 4.0, gettext, flex, bison, zlib-devel
@@ -219,6 +220,7 @@ cd %{srcdir}
%endif
%patch100 -p1 -b .sh64-fixup~
+%patch101 -p1 -b .microblaze-fixup~
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
@@ -661,7 +663,10 @@ rm -rf %{buildroot}
%do_files xtensa-linux-gnu %{build_xtensa}
%changelog
-* Wed Jan 7 2015 David Howells <dhowells at redhat.com> - 2.25-2
+* Mon Apr 6 2015 David Howells <dhowells at redhat.com> - 2.25-4
+- Microblaze: Fix extra-large constant handling [binutils bz 18189].
+
+* Wed Jan 7 2015 David Howells <dhowells at redhat.com> - 2.25-3
- Fix up the target for SH64 and cease mixing 32-bit SH targets with SH64.
- SH64: Work around flags not getting set on incremental link of .a into .o [binutils bz 17288].
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/cross-binutils.git/commit/?h=f22&id=bccbf073593f47b0548b232b72465e9d6748ad6b
More information about the scm-commits
mailing list