Changeset 1973 for binutils/trunk/opcodes/ip2k-asm.c
- Timestamp:
- Feb 6, 2017, 1:00:00 PM (8 years ago)
- Location:
- binutils/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
binutils/trunk ¶
-
Property svn:mergeinfo
set to
/binutils/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
TabularUnified binutils/trunk/opcodes/ip2k-asm.c ¶
r970 r1973 5 5 - the resultant file is machine generated, cgen-asm.in isn't 6 6 7 Copyright (C) 1996-201 4Free Software Foundation, Inc.7 Copyright (C) 1996-2016 Free Software Foundation, Inc. 8 8 9 9 This file is part of libopcodes. … … 60 60 const char *errmsg; 61 61 const char *old_strp; 62 char *afteroffset; 62 char *afteroffset; 63 63 enum cgen_parse_operand_result result_type; 64 64 bfd_vma value; … … 109 109 else 110 110 { 111 *strp += 4; 111 *strp += 4; 112 112 *valuep = 0; 113 113 errmsg = NULL; … … 243 243 return errmsg; 244 244 } 245 245 246 246 errmsg = cgen_parse_address (cd, strp, opindex, code, 247 247 & result_type, & value); … … 257 257 /* code = BFD_RELOC_IP2K_LOW8DATA. */ 258 258 value &= 0x00FF; 259 } 259 } 260 260 *valuep = value; 261 261 } … … 274 274 bfd_reloc_code_real_type code = BFD_RELOC_NONE; 275 275 bfd_vma value; 276 276 277 277 if (opindex == (CGEN_OPERAND_TYPE) IP2K_OPERAND_ADDR16CJP) 278 278 code = BFD_RELOC_IP2K_ADDR16CJP; … … 302 302 *valuep = value; 303 303 } 304 else 304 else 305 305 errmsg = _("cgen_parse_address returned a symbol. Literal required."); 306 306 } 307 return errmsg; 307 return errmsg; 308 308 } 309 309 … … 354 354 if (code != BFD_RELOC_NONE) 355 355 { 356 errmsg = cgen_parse_address (cd, strp, opindex, code, 356 errmsg = cgen_parse_address (cd, strp, opindex, code, 357 357 & result_type, & value); 358 358 if ((errmsg == NULL) && … … 414 414 return errmsg; 415 415 } 416 416 417 417 if (mode == 1) 418 418 { … … 433 433 } 434 434 } 435 435 436 436 *valuep = count; 437 437 } … … 516 516 } 517 517 518 cgen_parse_fn * const ip2k_cgen_parse_handlers[] = 518 cgen_parse_fn * const ip2k_cgen_parse_handlers[] = 519 519 { 520 520 parse_insn_normal, … … 547 547 Returns NULL for success, an error message for failure. */ 548 548 549 char * 549 char * 550 550 ip2k_cgen_build_insn_regex (CGEN_INSN *insn) 551 { 551 { 552 552 CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn); 553 553 const char *mnem = CGEN_INSN_MNEMONIC (insn); … … 588 588 for(; * syn != 0 && rx <= rxbuf + (CGEN_MAX_RX_ELEMENTS - 7 - 4); ++syn) 589 589 { 590 if (CGEN_SYNTAX_CHAR_P (* syn)) 590 if (CGEN_SYNTAX_CHAR_P (* syn)) 591 591 { 592 592 char c = CGEN_SYNTAX_CHAR (* syn); 593 593 594 switch (c) 594 switch (c) 595 595 { 596 596 /* Escape any regex metacharacters in the syntax. */ 597 case '.': case '[': case '\\': 598 case '*': case '^': case '$': 597 case '.': case '[': case '\\': 598 case '*': case '^': case '$': 599 599 600 600 #ifdef CGEN_ESCAPE_EXTENDED_REGEX 601 case '?': case '{': case '}': 601 case '?': case '{': case '}': 602 602 case '(': case ')': case '*': 603 603 case '|': case '+': case ']': … … 629 629 630 630 /* Trailing whitespace ok. */ 631 * rx++ = '['; 632 * rx++ = ' '; 633 * rx++ = '\t'; 634 * rx++ = ']'; 635 * rx++ = '*'; 631 * rx++ = '['; 632 * rx++ = ' '; 633 * rx++ = '\t'; 634 * rx++ = ']'; 635 * rx++ = '*'; 636 636 637 637 /* But anchor it after that. */ 638 * rx++ = '$'; 638 * rx++ = '$'; 639 639 * rx = '\0'; 640 640 … … 642 642 reg_err = regcomp ((regex_t *) CGEN_INSN_RX (insn), rxbuf, REG_NOSUB); 643 643 644 if (reg_err == 0) 644 if (reg_err == 0) 645 645 return NULL; 646 646 else … … 843 843 recognized_mnemonic = 1; 844 844 845 #ifdef CGEN_VALIDATE_INSN_SUPPORTED 845 #ifdef CGEN_VALIDATE_INSN_SUPPORTED 846 846 /* Not usually needed as unsupported opcodes 847 847 shouldn't be in the hash lists. */ … … 903 903 /* xgettext:c-format */ 904 904 sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start); 905 else 905 else 906 906 /* xgettext:c-format */ 907 907 sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start); … … 912 912 /* xgettext:c-format */ 913 913 sprintf (errbuf, _("bad instruction `%.50s...'"), start); 914 else 914 else 915 915 /* xgettext:c-format */ 916 916 sprintf (errbuf, _("bad instruction `%.50s'"), start); 917 917 } 918 918 919 919 *errmsg = errbuf; 920 920 return NULL;
Note:
See TracChangeset
for help on using the changeset viewer.