This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
RFA/PATCH: gas support for $ prefix for hex literals
- To: binutils at sourceware dot cygnus dot com
- Subject: RFA/PATCH: gas support for $ prefix for hex literals
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- Date: Thu, 22 Jun 2000 11:36:51 -0400
- Cc: Nick Clifton <nickc at redhat dot com>
Hi -
I believe the following patch is a reasonable way to implement support
for `$'-prefixing for hexadecimal literals. (For the target of my interest,
`$' chars won't appear in identifiers.) May I commit? Comments?
- FChE
2000-06-22 Frank Ch. Eigler <fche@redhat.com>
* expr.c (operand): Permit $hex literals if LITERAL_PREFIXDOLLAR_HEX
is defined.
Index: expr.c
===================================================================
RCS file: /cvs/src/src/gas/expr.c,v
retrieving revision 1.17
diff -c -p -r1.17 expr.c
*** expr.c 2000/06/19 01:22:39 1.17
--- expr.c 2000/06/22 15:35:41
*************** operand (expressionP)
*** 820,825 ****
--- 820,831 ----
expressionP);
break;
+ #ifdef LITERAL_PREFIXDOLLAR_HEX
+ case '$':
+ integer_constant (16, expressionP);
+ break;
+ #endif
+
case '0':
/* non-decimal radix */