Apply patch for PR 10856. (BZ 544358)
This commit is contained in:
parent
59a4c4b1b3
commit
655e7ef445
115
binutils-2.20.51.0.2-gas-expr.patch
Normal file
115
binutils-2.20.51.0.2-gas-expr.patch
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
diff -rup ../binutils-2.20.51.0.2.original/gas/ChangeLog gas/ChangeLog
|
||||||
|
--- ../binutils-2.20.51.0.2.original/gas/ChangeLog 2009-12-09 11:46:00.000000000 +0000
|
||||||
|
+++ gas/ChangeLog 2009-12-09 11:48:31.000000000 +0000
|
||||||
|
@@ -1,3 +1,10 @@
|
||||||
|
+2009-10-28 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
+
|
||||||
|
+ PR gas/10856
|
||||||
|
+ * expr.c (resolve_expression): Only add "left" value to O_symbol
|
||||||
|
+ expression when the symbol is undefined and different from the
|
||||||
|
+ original symbol. Simplify negative logic.
|
||||||
|
+
|
||||||
|
2009-10-07 Nathan Sidwell <nathan@codesourcery.com>
|
||||||
|
|
||||||
|
* config/tc-arm.c (mapping_state, mapping_state_2): Make dummy
|
||||||
|
Only in ../binutils-2.20.51.0.2.original/gas: .#expr.c
|
||||||
|
Only in ../binutils-2.20.51.0.2.original/gas: #expr.c#
|
||||||
|
diff -rup ../binutils-2.20.51.0.2.original/gas/expr.c gas/expr.c
|
||||||
|
--- ../binutils-2.20.51.0.2.original/gas/expr.c 2009-12-09 11:45:56.000000000 +0000
|
||||||
|
+++ gas/expr.c 2009-12-09 11:48:10.000000000 +0000
|
||||||
|
@@ -1997,6 +1997,7 @@ resolve_expression (expressionS *express
|
||||||
|
/* Help out with CSE. */
|
||||||
|
valueT final_val = expressionP->X_add_number;
|
||||||
|
symbolS *add_symbol = expressionP->X_add_symbol;
|
||||||
|
+ symbolS *orig_add_symbol = add_symbol;
|
||||||
|
symbolS *op_symbol = expressionP->X_op_symbol;
|
||||||
|
operatorT op = expressionP->X_op;
|
||||||
|
valueT left, right;
|
||||||
|
@@ -2078,6 +2079,7 @@ resolve_expression (expressionS *express
|
||||||
|
left = right;
|
||||||
|
seg_left = seg_right;
|
||||||
|
add_symbol = op_symbol;
|
||||||
|
+ orig_add_symbol = expressionP->X_op_symbol;
|
||||||
|
op = O_symbol;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
@@ -2122,18 +2124,19 @@ resolve_expression (expressionS *express
|
||||||
|
{
|
||||||
|
if (op == O_bit_exclusive_or || op == O_bit_inclusive_or)
|
||||||
|
{
|
||||||
|
- if (seg_right != absolute_section || right != 0)
|
||||||
|
+ if (!(seg_right == absolute_section && right == 0))
|
||||||
|
{
|
||||||
|
seg_left = seg_right;
|
||||||
|
left = right;
|
||||||
|
add_symbol = op_symbol;
|
||||||
|
+ orig_add_symbol = expressionP->X_op_symbol;
|
||||||
|
}
|
||||||
|
op = O_symbol;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (op == O_left_shift || op == O_right_shift)
|
||||||
|
{
|
||||||
|
- if (seg_left != absolute_section || left != 0)
|
||||||
|
+ if (!(seg_left == absolute_section && left == 0))
|
||||||
|
{
|
||||||
|
op = O_symbol;
|
||||||
|
break;
|
||||||
|
@@ -2150,6 +2153,7 @@ resolve_expression (expressionS *express
|
||||||
|
left = right;
|
||||||
|
add_symbol = op_symbol;
|
||||||
|
op = O_symbol;
|
||||||
|
+ orig_add_symbol = expressionP->X_op_symbol;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if ((op == O_multiply || op == O_divide)
|
||||||
|
@@ -2158,11 +2162,11 @@ resolve_expression (expressionS *express
|
||||||
|
op = O_symbol;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
- else if (left != right
|
||||||
|
- || ((seg_left != reg_section || seg_right != reg_section)
|
||||||
|
- && (seg_left != undefined_section
|
||||||
|
- || seg_right != undefined_section
|
||||||
|
- || add_symbol != op_symbol)))
|
||||||
|
+ else if (!(left == right
|
||||||
|
+ && ((seg_left == reg_section && seg_right == reg_section)
|
||||||
|
+ || (seg_left == undefined_section
|
||||||
|
+ && seg_right == undefined_section
|
||||||
|
+ && add_symbol == op_symbol))))
|
||||||
|
return 0;
|
||||||
|
else if (op == O_bit_and || op == O_bit_inclusive_or)
|
||||||
|
{
|
||||||
|
@@ -2233,7 +2237,8 @@ resolve_expression (expressionS *express
|
||||||
|
op = O_constant;
|
||||||
|
else if (seg_left == reg_section && final_val == 0)
|
||||||
|
op = O_register;
|
||||||
|
- else if (add_symbol != expressionP->X_add_symbol)
|
||||||
|
+ else if (seg_left == undefined_section
|
||||||
|
+ && add_symbol != orig_add_symbol)
|
||||||
|
final_val += left;
|
||||||
|
expressionP->X_add_symbol = add_symbol;
|
||||||
|
}
|
||||||
|
diff -rup ../binutils-2.20.51.0.2.original/gas/testsuite/ChangeLog gas/testsuite/ChangeLog
|
||||||
|
--- ../binutils-2.20.51.0.2.original/gas/testsuite/ChangeLog 2009-12-09 11:45:56.000000000 +0000
|
||||||
|
+++ gas/testsuite/ChangeLog 2009-12-09 11:50:11.000000000 +0000
|
||||||
|
@@ -1,3 +1,7 @@
|
||||||
|
+2009-10-28 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
+
|
||||||
|
+ * gas/i386/intelpic.d: Correct.
|
||||||
|
+
|
||||||
|
2009-10-08 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
PR gas/10704
|
||||||
|
diff -rup ../binutils-2.20.51.0.2.original/gas/testsuite/gas/i386/intelpic.d gas/testsuite/gas/i386/intelpic.d
|
||||||
|
--- ../binutils-2.20.51.0.2.original/gas/testsuite/gas/i386/intelpic.d 2009-12-09 11:45:59.000000000 +0000
|
||||||
|
+++ gas/testsuite/gas/i386/intelpic.d 2009-12-09 11:49:17.000000000 +0000
|
||||||
|
@@ -12,6 +12,6 @@ Disassembly of section .text:
|
||||||
|
0+1 <bar>:
|
||||||
|
[ ]*[a-f0-9]+: 8d 83 14 00 00 00 lea 0x14\(%ebx\),%eax
|
||||||
|
[ ]*[a-f0-9]+: 8b 83 00 00 00 00 mov 0x0\(%ebx\),%eax
|
||||||
|
-[ ]*[a-f0-9]+: ff 24 85 1a 00 00 00 jmp \*0x1a\(,%eax,4\)
|
||||||
|
+[ ]*[a-f0-9]+: ff 24 85 0d 00 00 00 jmp \*0xd\(,%eax,4\)
|
||||||
|
[ ]*[a-f0-9]+: 8d 83 14 00 00 00 lea 0x14\(%ebx\),%eax
|
||||||
|
#pass
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
Summary: A GNU collection of binary utilities
|
Summary: A GNU collection of binary utilities
|
||||||
Name: %{?cross}binutils%{?_with_debug:-debug}
|
Name: %{?cross}binutils%{?_with_debug:-debug}
|
||||||
Version: 2.20.51.0.2
|
Version: 2.20.51.0.2
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
URL: http://sources.redhat.com/binutils
|
URL: http://sources.redhat.com/binutils
|
||||||
@ -34,6 +34,7 @@ Patch08: binutils-2.20.51.0.2-add-needed.patch
|
|||||||
Patch09: binutils-2.20.51.0.2-ifunc-ld-s.patch
|
Patch09: binutils-2.20.51.0.2-ifunc-ld-s.patch
|
||||||
Patch10: binutils-2.20.51.0.2-lwp.patch
|
Patch10: binutils-2.20.51.0.2-lwp.patch
|
||||||
Patch11: binutils-2.20.51.0.2-enable-gold.patch
|
Patch11: binutils-2.20.51.0.2-enable-gold.patch
|
||||||
|
Patch12: binutils-2.20.51.0.2-gas-expr.patch
|
||||||
|
|
||||||
%define gold_arches %ix86 x86_64
|
%define gold_arches %ix86 x86_64
|
||||||
|
|
||||||
@ -126,6 +127,7 @@ to consider using libelf instead of BFD.
|
|||||||
%patch09 -p0 -b .ifunc-ld-s~
|
%patch09 -p0 -b .ifunc-ld-s~
|
||||||
%patch10 -p0 -b .lwp~
|
%patch10 -p0 -b .lwp~
|
||||||
%patch11 -p0 -b .enable-gold~
|
%patch11 -p0 -b .enable-gold~
|
||||||
|
%patch12 -p0 -b .gas-expr~
|
||||||
|
|
||||||
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
|
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
|
||||||
|
|
||||||
@ -423,6 +425,9 @@ exit 0
|
|||||||
%endif # %{isnative}
|
%endif # %{isnative}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 9 2009 Nick Clifton <nickc@redhat.com> - 2.20.51.0.2-9
|
||||||
|
- Apply patch for PR 10856. (BZ 544358)
|
||||||
|
|
||||||
* Tue Dec 1 2009 Roland McGrath <roland@redhat.com> - 2.20.51.0.2-8
|
* Tue Dec 1 2009 Roland McGrath <roland@redhat.com> - 2.20.51.0.2-8
|
||||||
- Build gold only for x86 flavors until others are tested.
|
- Build gold only for x86 flavors until others are tested.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user