public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Patch to handle ehopt0.s testcase
@ 2001-07-20  9:06 J. Johnston
  2001-07-21  1:36 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: J. Johnston @ 2001-07-20  9:06 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Patch to handle ehopt0.s testcase
  2001-07-20  9:06 Patch to handle ehopt0.s testcase J. Johnston
@ 2001-07-21  1:36 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2001-07-21  1:36 UTC (permalink / raw)
  To: J. Johnston; +Cc: binutils

Hi Jeff,

> 2001-07-20  Jeff Johnston  <jjohnstn@redhat.com>
> 
> 	* expr.c [LITERAL_PREFIXDOLLAR_HEX]: If $L, treat as name
> 	instead of number.

Approved.

Cheers
        Nick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-21  1:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-20  9:06 Patch to handle ehopt0.s testcase J. Johnston
2001-07-21  1:36 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).