This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] allow != instead of <> in as
- From: Arnold Metselaar <arnold dot metselaar at planet dot nl>
- To: binutils at sources dot redhat dot com
- Date: Sat, 01 Oct 2005 22:43:33 +0200
- Subject: [PATCH] allow != instead of <> in as
The following patch will make as accept "!=" as a synonym for
"<>". The operator "!=" appears in some Z80 sources, and I
don't see a reason not to allow it.
Regards,
Arnold
gas/ChangeLog
* expr.c (operator) <case '!'>: allow "!=" for O_ne
* doc/as.texinfo (infix operators): mention "!="
--- gas/expr.c 2005-05-05 11:12:45.000000000 +0200
+++ gas/expr.c.new 2005-10-01 21:28:50.000000000 +0200
@@ -1587,16 +1587,18 @@
return ret;
case '!':
- /* We accept !! as equivalent to ^ for MRI compatibility.
*/
- if (input_line_pointer[1] != '!')
- {
+ switch (input_line_pointer[1]) {
+ default:
if (flag_m68k_mri)
return O_bit_inclusive_or;
return op_encoding[c];
- }
+ case '!': /* We accept !! as equivalent to ^ for MRI
compatibility. */
*num_chars = 2;
return O_bit_exclusive_or;
-
+ case '=': /* We accept != as equivalent to <> */
+ *num_chars = 2;
+ return O_ne;
+ }
case '|':
if (input_line_pointer[1] != '|')
return op_encoding[c];
--- gas/doc/as.texinfo 2005-10-01 21:53:21.121261048 +0200
+++ gas/doc/as.texinfo.new 2005-10-01 22:26:53.023405432
+0200
@@ -3619,6 +3619,7 @@
@item ==
@dfn{Is Equal To}
@item <>
+@itemx !=
@dfn{Is Not Equal To}
@item <
@dfn{Is Less Than}