diff options
Diffstat (limited to 'opcodes/ia64-gen.c')
-rw-r--r-- | opcodes/ia64-gen.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/opcodes/ia64-gen.c b/opcodes/ia64-gen.c index 7f3f0ed..de409bb 100644 --- a/opcodes/ia64-gen.c +++ b/opcodes/ia64-gen.c @@ -467,7 +467,7 @@ fetch_insn_class (const char *full_name, int create) int ind; int is_class = 0; - if (CONST_STRNEQ (full_name, "IC:")) + if (startswith (full_name, "IC:")) { name = xstrdup (full_name + 3); is_class = 1; @@ -746,7 +746,7 @@ parse_resource_users (const char *ref, int **usersp, int *nusersp, are read. Only create new classes if it's *not* an insn class, or if it's a composite class (which wouldn't necessarily be in the IC table). */ - if (! CONST_STRNEQ (name, "IC:") || xsect != NULL) + if (! startswith (name, "IC:") || xsect != NULL) create = 1; iclass = fetch_insn_class (name, create); @@ -1039,7 +1039,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic, if (ic->comment) { - if (CONST_STRNEQ (ic->comment, "Format")) + if (startswith (ic->comment, "Format")) { /* Assume that the first format seen is the most restrictive, and only keep a later one if it looks like it's more restrictive. */ @@ -1055,7 +1055,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic, else format = ic->comment; } - else if (CONST_STRNEQ (ic->comment, "Field")) + else if (startswith (ic->comment, "Field")) { if (field) warn (_("overlapping field %s->%s\n"), @@ -1069,7 +1069,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic, instructions. */ if (ic->nsubs == 0 && ic->nxsubs == 0) { - int is_mov = CONST_STRNEQ (idesc->name, "mov"); + int is_mov = startswith (idesc->name, "mov"); int plain_mov = strcmp (idesc->name, "mov") == 0; int len = strlen(ic->name); @@ -1128,32 +1128,32 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic, if (resolved && format) { - if (CONST_STRNEQ (idesc->name, "dep") + if (startswith (idesc->name, "dep") && strstr (format, "I13") != NULL) resolved = idesc->operands[1] == IA64_OPND_IMM8; - else if (CONST_STRNEQ (idesc->name, "chk") + else if (startswith (idesc->name, "chk") && strstr (format, "M21") != NULL) resolved = idesc->operands[0] == IA64_OPND_F2; - else if (CONST_STRNEQ (idesc->name, "lfetch")) + else if (startswith (idesc->name, "lfetch")) resolved = (strstr (format, "M14 M15") != NULL && (idesc->operands[1] == IA64_OPND_R2 || idesc->operands[1] == IA64_OPND_IMM9b)); - else if (CONST_STRNEQ (idesc->name, "br.call") + else if (startswith (idesc->name, "br.call") && strstr (format, "B5") != NULL) resolved = idesc->operands[1] == IA64_OPND_B2; - else if (CONST_STRNEQ (idesc->name, "br.call") + else if (startswith (idesc->name, "br.call") && strstr (format, "B3") != NULL) resolved = idesc->operands[1] == IA64_OPND_TGT25c; - else if (CONST_STRNEQ (idesc->name, "brp") + else if (startswith (idesc->name, "brp") && strstr (format, "B7") != NULL) resolved = idesc->operands[0] == IA64_OPND_B2; else if (strcmp (ic->name, "invala") == 0) resolved = strcmp (idesc->name, ic->name) == 0; - else if (CONST_STRNEQ (idesc->name, "st") + else if (startswith (idesc->name, "st") && (strstr (format, "M5") != NULL || strstr (format, "M10") != NULL)) resolved = idesc->flags & IA64_OPCODE_POSTINC; - else if (CONST_STRNEQ (idesc->name, "ld") + else if (startswith (idesc->name, "ld") && (strstr (format, "M2 M3") != NULL || strstr (format, "M12") != NULL || strstr (format, "M7 M8") != NULL)) @@ -1166,7 +1166,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic, plain brl matches brl.cond. */ if (!resolved && (strcmp (idesc->name, "brl") == 0 - || CONST_STRNEQ (idesc->name, "brl.")) + || startswith (idesc->name, "brl.")) && strcmp (ic->name, "brl.cond") == 0) { resolved = 1; @@ -1175,7 +1175,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic, /* Misc br variations ('.cond' is optional). */ if (!resolved && (strcmp (idesc->name, "br") == 0 - || CONST_STRNEQ (idesc->name, "br.")) + || startswith (idesc->name, "br.")) && strcmp (ic->name, "br.cond") == 0) { if (format) @@ -1188,7 +1188,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic, } /* probe variations. */ - if (!resolved && CONST_STRNEQ (idesc->name, "probe")) + if (!resolved && startswith (idesc->name, "probe")) { resolved = strcmp (ic->name, "probe") == 0 && !((strstr (idesc->name, "fault") != NULL) @@ -1222,7 +1222,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic, } /* Some variants of mov and mov.[im]. */ - if (!resolved && CONST_STRNEQ (ic->name, "mov_")) + if (!resolved && startswith (ic->name, "mov_")) resolved = in_iclass_mov_x (idesc, ic, format, field); } @@ -1487,13 +1487,13 @@ lookup_specifier (const char *name) warn (_("Don't know how to specify # dependency %s\n"), name); } - else if (CONST_STRNEQ (name, "AR[FPSR]")) + else if (startswith (name, "AR[FPSR]")) return IA64_RS_AR_FPSR; - else if (CONST_STRNEQ (name, "AR[")) + else if (startswith (name, "AR[")) return IA64_RS_ARX; - else if (CONST_STRNEQ (name, "CR[")) + else if (startswith (name, "CR[")) return IA64_RS_CRX; - else if (CONST_STRNEQ (name, "PSR.")) + else if (startswith (name, "PSR.")) return IA64_RS_PSR; else if (strcmp (name, "InService*") == 0) return IA64_RS_INSERVICE; @@ -2444,7 +2444,7 @@ insert_opcode_dependencies (struct ia64_opcode *opc, int j; if (strcmp (opc->name, "cmp.eq.and") == 0 - && CONST_STRNEQ (rs->name, "PR%") + && startswith (rs->name, "PR%") && rs->mode == 1) no_class_found = 99; @@ -2455,7 +2455,7 @@ insert_opcode_dependencies (struct ia64_opcode *opc, if (in_iclass (opc, ics[rs->regs[j]], NULL, NULL, &ic_note)) { /* We can ignore ic_note 11 for non PR resources. */ - if (ic_note == 11 && ! CONST_STRNEQ (rs->name, "PR")) + if (ic_note == 11 && ! startswith (rs->name, "PR")) ic_note = 0; if (ic_note != 0 && rs->regnotes[j] != 0 @@ -2483,7 +2483,7 @@ insert_opcode_dependencies (struct ia64_opcode *opc, if (in_iclass (opc, ics[rs->chks[j]], NULL, NULL, &ic_note)) { /* We can ignore ic_note 11 for non PR resources. */ - if (ic_note == 11 && ! CONST_STRNEQ (rs->name, "PR")) + if (ic_note == 11 && ! startswith (rs->name, "PR")) ic_note = 0; if (ic_note != 0 && rs->chknotes[j] != 0 |