From: Nick Clifton Date: Mon, 10 Oct 2005 15:32:44 +0000 (+0000) Subject: * expr.c (operator): Allow "!=" as a synonym for "<>". X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=723a84724a863b280401482c362df8bb6375cc9d;p=binutils-gdb.git * expr.c (operator): Allow "!=" as a synonym for "<>". * doc/as.texinfo (Infix Op): Mention "!=". --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 3ee3d630c84..df3ac710c0c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-10-10 Arnold Metselaar + + * expr.c (operator): Allow "!=" as a synonym for "<>". + * doc/as.texinfo (Infix Op): Mention "!=". + 2005-10-08 John David Anglin * config/tc-hppa.c (strict): Don't initialize. Update comment. diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index dfa9cb8376b..1d9ae0c269f 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 7e37010949d..fff0fde7075 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] != '|')