OSDN Git Service

* expr.c (operand <case '$'>): Use DOLLAR_AMBIGU rather than flag_mri_m68k
authorNick Clifton <nickc@redhat.com>
Tue, 8 Nov 2005 15:48:26 +0000 (15:48 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 8 Nov 2005 15:48:26 +0000 (15:48 +0000)
  as condition for parsing the '$' as a prefix.
* as.h (DOLLAR_AMBIGU): Define if needed.

gas/ChangeLog
gas/as.h
gas/expr.c

index cfbd519..9fa5735 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-08  Arnold Metselaar  <arnold.metselaar@planet.nl>
+
+       * expr.c (operand <case '$'>): Use DOLLAR_AMBIGU rather than
+       flag_mri_m68k as condition for parsing the '$' as a prefix.
+       * as.h (DOLLAR_AMBIGU): Define if needed.
+
 2005-11-08  Nathan Sidwell  <nathan@codesourcery.com>
 
        Add ms2 support.
index 22377b6..5dad712 100644 (file)
--- a/gas/as.h
+++ b/gas/as.h
@@ -586,6 +586,7 @@ int generic_force_reloc (struct fix *);
 #ifdef TC_M68K
 /* True if we are assembling in m68k MRI mode.  */
 COMMON int flag_m68k_mri;
+#define DOLLAR_AMBIGU flag_m68k_mri
 #else
 #define flag_m68k_mri 0
 #endif
@@ -596,6 +597,10 @@ COMMON unsigned int  found_comment;
 COMMON char *        found_comment_file;
 #endif
 
+#ifndef DOLLAR_AMBIGU
+#define DOLLAR_AMBIGU 0
+#endif
+
 #ifndef NUMBERS_WITH_SUFFIX
 #define NUMBERS_WITH_SUFFIX 0
 #endif
index a5a7771..c601b0a 100644 (file)
@@ -1095,10 +1095,10 @@ operand (expressionS *expressionP, enum expr_mode mode)
       if (! flag_m68k_mri)
        goto de_fault;
 #endif
-      if (flag_m68k_mri && hex_p (*input_line_pointer))
+      if (DOLLAR_AMBIGU && hex_p (*input_line_pointer))
        {
-         /* In MRI mode, '$' is also used as the prefix for a
-            hexadecimal constant.  */
+         /* In MRI mode and on Z80, '$' is also used as the prefix
+            for a hexadecimal constant.  */
          integer_constant (16, expressionP);
          break;
        }