diff options
author | Nick Clifton <nickc@redhat.com> | 2004-05-24 14:33:22 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2004-05-24 14:33:22 +0000 |
commit | be8c092bb0532fb342e38ed21a8cf8ce7773b98f (patch) | |
tree | ad882b4e0f8e1ca15b6f8b6a9cb6769fbaa5230c /gas/config/m68k-parse.y | |
parent | dfdffa2c3c2df36aa57d5beee75ca3fb15e3a736 (diff) | |
download | gdb-be8c092bb0532fb342e38ed21a8cf8ce7773b98f.zip gdb-be8c092bb0532fb342e38ed21a8cf8ce7773b98f.tar.gz gdb-be8c092bb0532fb342e38ed21a8cf8ce7773b98f.tar.bz2 |
Reorganise m68k instruction decoding and improve handling of MAC/EMAC
Diffstat (limited to 'gas/config/m68k-parse.y')
-rw-r--r-- | gas/config/m68k-parse.y | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gas/config/m68k-parse.y b/gas/config/m68k-parse.y index c56ad23..d6bb4b8 100644 --- a/gas/config/m68k-parse.y +++ b/gas/config/m68k-parse.y @@ -1,5 +1,5 @@ /* m68k.y -- bison grammar for m68k operand parsing - Copyright 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 2001, 2004 Free Software Foundation, Inc. Written by Ken Raeburn and Ian Lance Taylor, Cygnus Support This file is part of GAS, the GNU Assembler. @@ -35,7 +35,7 @@ etc), as well as gratuitously global symbol names If other parser generators (bison, byacc, etc) produce additional global names that conflict at link time, then those parser generators need to be - fixed instead of adding those names to this list. */ + fixed instead of adding those names to this list. */ #define yymaxdepth m68k_maxdepth #define yyparse m68k_parse @@ -122,7 +122,10 @@ operand: { op->trailing_ampersand = $2; } - | mit_operand + | mit_operand optional_ampersand + { + op->trailing_ampersand = $2; + } ; /* A trailing ampersand(for MAC/EMAC mask addressing). */ @@ -793,8 +796,8 @@ yylex () case '-': /* A '-' can only appear in -(ar), rn-rn, or ar@-. If it appears anywhere else, it must be a unary minus on an - expression. */ - if (str[1] == '\0') + expression, unless it it trailed by a '&'(see mac load insn). */ + if (str[1] == '\0' || (str[1] == '&' && str[2] == '\0')) return *str++; s = str + 1; if (*s == '(') |