Changeset 609 for branches/GNU/src/binutils/opcodes/cgen-asm.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/opcodes/cgen-asm.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* CGEN generic assembler support code. 2 2 3 Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.3 Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. 4 4 5 5 This file is part of the GNU Binutils and GDB, the GNU debugger. … … 21 21 #include "sysdep.h" 22 22 #include <stdio.h> 23 #include <ctype.h>24 23 #include "ansidecl.h" 25 24 #include "libiberty.h" 25 #include "safe-ctype.h" 26 26 #include "bfd.h" 27 27 #include "symcat.h" 28 28 #include "opcode/cgen.h" 29 29 #include "opintl.h" 30 31 static CGEN_INSN_LIST * hash_insn_array PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, int, int, CGEN_INSN_LIST **, CGEN_INSN_LIST *)); 32 static CGEN_INSN_LIST * hash_insn_list PARAMS ((CGEN_CPU_DESC, const CGEN_INSN_LIST *, CGEN_INSN_LIST **, CGEN_INSN_LIST *)); 33 static void build_asm_hash_table PARAMS ((CGEN_CPU_DESC)); 30 34 31 35 /* Set the cgen_parse_operand_fn callback. */ … … 209 213 const char *p,*start; 210 214 215 if (keyword_table->name_hash_table == NULL) 216 (void) cgen_keyword_search_init (keyword_table, NULL); 217 211 218 p = start = *strp; 212 219 213 /* Allow any first character. 214 Note that this allows recognizing ",a" for the annul flag in sparc215 even though "," is subsequently not a valid keyword char. */220 /* Allow any first character. This is to make life easier for 221 the fairly common case of suffixes, eg. 'ld.b.w', where the first 222 character of the suffix ('.') is special. */ 216 223 if (*p) 217 224 ++p; 218 219 /* Now allow letters, digits, and _. */225 226 /* Allow letters, digits, and any special characters. */ 220 227 while (((p - start) < (int) sizeof (buf)) 221 && (isalnum ((unsigned char) *p) || *p == '_')) 228 && *p 229 && (ISALNUM (*p) 230 || *p == '_' 231 || strchr (keyword_table->nonalpha_chars, *p))) 222 232 ++p; 223 233 224 234 if (p - start >= (int) sizeof (buf)) 225 return _("unrecognized keyword/register name"); 226 227 memcpy (buf, start, p - start); 228 buf[p - start] = 0; 235 { 236 /* All non-empty CGEN keywords can fit into BUF. The only thing 237 we can match here is the empty keyword. */ 238 buf[0] = 0; 239 } 240 else 241 { 242 memcpy (buf, start, p - start); 243 buf[p - start] = 0; 244 } 229 245 230 246 ke = cgen_keyword_lookup_name (keyword_table, buf); -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.