aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-10-10 15:32:44 +0000
committerNick Clifton <nickc@redhat.com>2005-10-10 15:32:44 +0000
commit723a84724a863b280401482c362df8bb6375cc9d (patch)
tree6c9d0efdf8ab35b5d7fe4391a20973205f83c707 /gas
parent9c092ace490c12dd596b82c8fd0028f88436ef9e (diff)
downloadgdb-723a84724a863b280401482c362df8bb6375cc9d.zip
gdb-723a84724a863b280401482c362df8bb6375cc9d.tar.gz
gdb-723a84724a863b280401482c362df8bb6375cc9d.tar.bz2
* expr.c (operator): Allow "!=" as a synonym for "<>".
* doc/as.texinfo (Infix Op): Mention "!=".
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/doc/as.texinfo1
-rw-r--r--gas/expr.c14
3 files changed, 16 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 3ee3d63..df3ac71 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-10 Arnold Metselaar <arnold.metselaar@planet.nl>
+
+ * expr.c (operator): Allow "!=" as a synonym for "<>".
+ * doc/as.texinfo (Infix Op): Mention "!=".
+
2005-10-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* config/tc-hppa.c (strict): Don't initialize. Update comment.
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index dfa9cb8..1d9ae0c 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -3619,6 +3619,7 @@ You may not subtract arguments from different sections.
@item ==
@dfn{Is Equal To}
@item <>
+@itemx !=
@dfn{Is Not Equal To}
@item <
@dfn{Is Less Than}
diff --git a/gas/expr.c b/gas/expr.c
index 7e37010..fff0fde 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -1587,15 +1587,21 @@ operator (int *num_chars)
return ret;
case '!':
- /* We accept !! as equivalent to ^ for MRI compatibility. */
- if (input_line_pointer[1] != '!')
+ switch (input_line_pointer[1])
{
+ 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;
+ default:
if (flag_m68k_mri)
return O_bit_inclusive_or;
return op_encoding[c];
}
- *num_chars = 2;
- return O_bit_exclusive_or;
case '|':
if (input_line_pointer[1] != '|')