This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch to handle ehopt0.s testcase


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]