* [PATCH] allow != instead of <> in as
@ 2005-10-02 1:43 Arnold Metselaar
2005-10-10 15:33 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Arnold Metselaar @ 2005-10-02 1:43 UTC (permalink / raw)
To: binutils
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}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] allow != instead of <> in as
2005-10-02 1:43 [PATCH] allow != instead of <> in as Arnold Metselaar
@ 2005-10-10 15:33 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2005-10-10 15:33 UTC (permalink / raw)
To: Arnold Metselaar; +Cc: binutils
Hi Arnold,
> gas/ChangeLog
> * expr.c (operator) <case '!'>: allow "!=" for O_ne
> * doc/as.texinfo (infix operators): mention "!="
Approved and applied.
Note - your formatting was a little off, so I fixed that.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-10 15:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-02 1:43 [PATCH] allow != instead of <> in as Arnold Metselaar
2005-10-10 15:33 ` 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).