From d160e0350800d373c906f5fecd0bf0f61c61519c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 1 Jun 2009 16:31:00 +0000 Subject: gas/ 2009-06-01 H.J. Lu PR gas/10198 * config/tc-i386-intel.c (i386_intel_operand): Check '$' as '.'. gas/testsuite/ 2009-06-01 H.J. Lu PR gas/10198 * gas/i386/jump.s: Add test for "jmp $+2". * gas/i386/jump16.s: Likewise. * gas/i386/jump.d: Updated. * gas/i386/jump16.d: Likewise. --- gas/config/tc-i386-intel.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gas/config') diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c index e76e527..64d83e3 100644 --- a/gas/config/tc-i386-intel.c +++ b/gas/config/tc-i386-intel.c @@ -475,6 +475,11 @@ i386_intel_operand (char *operand_string, int got_a_float) saved_input_line_pointer = input_line_pointer; input_line_pointer = buf = xstrdup (operand_string); + /* A '$' followed by an identifier char is an identifier. Otherwise, + it's operator '.' followed by an expression. */ + if (*buf == '$' && !is_identifier_char (buf[1])) + *buf = '.'; + intel_syntax = -1; memset (&exp, 0, sizeof(exp)); exp_seg = expression (&exp); -- cgit v1.1