This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Patch to handle ehopt0.s testcase
- To: binutils at sources dot redhat dot com
- Subject: Patch to handle ehopt0.s testcase
- From: "J. Johnston" <jjohnstn at cygnus dot com>
- Date: Fri, 20 Jul 2001 12:05:57 -0400
- Organization: Red Hat Inc.
I have a port whereby the gas/testsuite/gas/elf/ehopt.s testcase is failing. It is due to the fact
that the port uses $ as the hex prefix. In the testcase, there is a subtraction of two labels which
start with $L. The expression parser tries to read them as hex numbers and fails. The following
patch allows the parser to treat $L as labels instead of as a hex number.
Ok to commit?
-- Jeff J.
2001-07-20 Jeff Johnston <jjohnstn@redhat.com>
* expr.c [LITERAL_PREFIXDOLLAR_HEX]: If $L, treat as name instead of number.
Index: gas/expr.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gas/expr.c,v
retrieving revision 1.138
diff -p -r1.138 expr.c
*** expr.c 2001/07/14 15:56:16 1.138
--- expr.c 2001/07/19 09:29:38
*************** operand (expressionP)
*** 810,815 ****
--- 810,818 ----
#ifdef LITERAL_PREFIXDOLLAR_HEX
case '$':
+ /* $L is the start of a local label, not a hex constant. */
+ if (* input_line_pointer == 'L')
+ goto isname;
integer_constant (16, expressionP);
break;
#endif