]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2001-01-09 Jeff Johnston <jjohnstn@redhat.com>
authorJeff Johnston <jjohnstn@redhat.com>
Tue, 9 Jan 2001 17:01:07 +0000 (17:01 +0000)
committerJeff Johnston <jjohnstn@redhat.com>
Tue, 9 Jan 2001 17:01:07 +0000 (17:01 +0000)
        * cgen.h (CGEN_SYNTAX_CHAR_TYPE): New typedef based on max number
        of operands (unsigned char or unsigned short).
        (CGEN_SYNTAX): Changed to make array CGEN_SYNTAX_CHAR_TYPE.
        (CGEN_SYNTAX_CHAR): Changed to cast to unsigned char.

include/opcode/ChangeLog
include/opcode/cgen.h

index db9120ec506bbd8c6e69af880a107c2dd90298cf..11b2d9a7bb346eb39d841ebd5c17d9bcf6b2362e 100644 (file)
@@ -1,3 +1,10 @@
+2001-01-09  Jeff Johnston  <jjohnstn@redhat.com>
+
+       * cgen.h (CGEN_SYNTAX_CHAR_TYPE): New typedef based on max number
+       of operands (unsigned char or unsigned short).
+       (CGEN_SYNTAX): Changed to make array CGEN_SYNTAX_CHAR_TYPE.
+       (CGEN_SYNTAX_CHAR): Changed to cast to unsigned char.
+
 Fri Jan  5 13:22:23 MET 2001  Jan Hubicka  <jh@suse.cz>
 
        * i386.h (i386_optab): Make [sml]fence template to use immext field.
index 632545d271454b64ba92ffe9ad1080a0a3bb3f08..f7962cd7772f0b6d7e8692214e0f40b5ac039fe4 100644 (file)
@@ -1,6 +1,6 @@
 /* Header file for targets using CGEN: Cpu tools GENerator.
 
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GDB, the GNU debugger, and the GNU Binutils.
 
@@ -746,15 +746,20 @@ typedef struct
 #endif
 #endif
 
+#if !defined(MAX_OPERANDS) || MAX_OPERANDS <= 127
+typedef unsigned char CGEN_SYNTAX_CHAR_TYPE;
+#else
+typedef unsigned short CGEN_SYNTAX_CHAR_TYPE;
+#endif
 
 typedef struct
 {
-  unsigned char syntax[CGEN_MAX_SYNTAX_BYTES];
+  CGEN_SYNTAX_CHAR_TYPE syntax[CGEN_MAX_SYNTAX_BYTES];
 } CGEN_SYNTAX;
 
 #define CGEN_SYNTAX_STRING(syn) (syn->syntax)
 #define CGEN_SYNTAX_CHAR_P(c) ((c) < 128)
-#define CGEN_SYNTAX_CHAR(c) (c)
+#define CGEN_SYNTAX_CHAR(c) ((unsigned char)c)
 #define CGEN_SYNTAX_FIELD(c) ((c) - 128)
 #define CGEN_SYNTAX_MAKE_FIELD(c) ((c) + 128)