This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] allow "=" as comparison operator on z80


Hello,

The patch below allows to use "= instead of "==" on z80.

Arnold

ChangeLog:

* expr.c (op_encoding): map '='  to O_SINGLE_EQ, if defined
* config/tc-z80.h: define O_SINGLE_EQ as O_eq	
Index: expr.c
===================================================================
RCS file: /cvs/src/src/gas/expr.c,v
retrieving revision 1.60
diff -u -p -r1.60 expr.c
--- expr.c	11 Oct 2005 11:16:16 -0000	1.60
+++ expr.c	30 Oct 2005 18:03:45 -0000
@@ -1387,6 +1387,9 @@ clean_up_expression (expressionS *expres
 
 #undef __
 #define __ O_illegal
+#ifndef O_SINGLE_EQ
+#define O_SINGLE_EQ O_illegal
+#endif
 
 /* Maps ASCII -> operators.  */
 static const operatorT op_encoding[256] = {
@@ -1396,7 +1399,7 @@ static const operatorT op_encoding[256] 
   __, O_bit_or_not, __, __, __, O_modulus, O_bit_and, __,
   __, __, O_multiply, O_add, __, O_subtract, __, O_divide,
   __, __, __, __, __, __, __, __,
-  __, __, __, __, O_lt, __, O_gt, __,
+  __, __, __, __, O_lt, O_SINGLE_EQ, O_gt, __,
   __, __, __, __, __, __, __, __,
   __, __, __, __, __, __, __, __,
   __, __, __, __, __, __, __, __,
Index: config/tc-z80.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-z80.h,v
retrieving revision 1.1
diff -u -p -r1.1 tc-z80.h
--- config/tc-z80.h	25 Oct 2005 17:40:17 -0000	1.1
+++ config/tc-z80.h	30 Oct 2005 18:03:45 -0000
@@ -78,10 +78,12 @@ extern int z80_optimize_expr (expression
 
 #define LISTING_WORD_SIZE 2
 
+/* A single '=' is accepted as a comparison operator.  */
+#define O_SINGLE_EQ O_eq
+
 /* A '$' is used to refer to the current location or as a hex. prefix.  */
 #define DOLLAR_DOT
 #define DOLLAR_AMBIGU                1
-#define SINGLE_EQ_COMPARES
 #define LOCAL_LABELS_FB              1
 #define LITERAL_PREFIXPERCENT_BIN
 #define NUMBERS_WITH_SUFFIX          1
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]