projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't write to inferior_ptid in tracefile-tfile.c
[deliverable/binutils-gdb.git]
/
opcodes
/
mep-asm.c
diff --git
a/opcodes/mep-asm.c
b/opcodes/mep-asm.c
index 2fc3087215ce43b7415171817d4e0aad2ded96c0..c5c33070c7013a88b1c02212ecf93c6cb2b19711 100644
(file)
--- a/
opcodes/mep-asm.c
+++ b/
opcodes/mep-asm.c
@@
-1,11
+1,11
@@
+/* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */
/* Assembler interface for targets using CGEN. -*- C -*-
CGEN: Cpu tools GENerator
THIS FILE IS MACHINE GENERATED WITH CGEN.
- the resultant file is machine generated, cgen-asm.in isn't
/* Assembler interface for targets using CGEN. -*- C -*-
CGEN: Cpu tools GENerator
THIS FILE IS MACHINE GENERATED WITH CGEN.
- the resultant file is machine generated, cgen-asm.in isn't
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2007, 2008, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of libopcodes.
This file is part of libopcodes.
@@
-489,7
+489,7
@@
parse_unsigned7 (CGEN_CPU_DESC cd, const char **strp,
break;
default:
/* Safe assumption? */
break;
default:
/* Safe assumption? */
- abort ();
+ abort ();
}
errmsg = cgen_parse_address (cd, strp, opindex, reloc,
NULL, &value);
}
errmsg = cgen_parse_address (cd, strp, opindex, reloc,
NULL, &value);
@@
-535,7
+535,7
@@
parse_cdisp10 (CGEN_CPU_DESC cd,
if ((MEP_CPU & EF_MEP_CPU_MASK) == EF_MEP_CPU_C5)
wide = 1;
if ((MEP_CPU & EF_MEP_CPU_MASK) == EF_MEP_CPU_C5)
wide = 1;
- if (strncmp (*strp, "0x0", 3) == 0
+ if (strncmp (*strp, "0x0", 3) == 0
|| (**strp == '0' && *(*strp + 1) != 'x'))
have_zero = 1;
|| (**strp == '0' && *(*strp + 1) != 'x'))
have_zero = 1;
@@
-602,7
+602,7
@@
mep_cgen_expand_macros_and_parse_operand
static char *
str_append (char *dest, const char *input, int len)
static char *
str_append (char *dest, const char *input, int len)
-{
+{
char *new_dest;
int oldlen;
char *new_dest;
int oldlen;
@@
-638,8
+638,8
@@
expand_macro (arg *args, int narg, macro *mac)
/* printf("expanding macro %s with %d args\n", mac->name, narg + 1); */
while (*e)
{
/* printf("expanding macro %s with %d args\n", mac->name, narg + 1); */
while (*e)
{
- if (*e == '`' &&
- (*e+1) &&
+ if (*e == '`' &&
+ (*e+1) &&
((*(e + 1) - '1') <= MAXARGS) &&
((*(e + 1) - '1') <= narg))
{
((*(e + 1) - '1') <= MAXARGS) &&
((*(e + 1) - '1') <= narg))
{
@@
-662,7
+662,7
@@
expand_macro (arg *args, int narg, macro *mac)
free (result);
return rescanned_result;
}
free (result);
return rescanned_result;
}
- else
+ else
return result;
}
return result;
}
@@
-687,8
+687,8
@@
expand_string (const char *in, int first_only)
switch (state)
{
case IN_TEXT:
switch (state)
{
case IN_TEXT:
- if (*in == '%' && *(in + 1) && (!first_only || num_expansions == 0))
- {
+ if (*in == '%' && *(in + 1) && (!first_only || num_expansions == 0))
+ {
pmacro = lookup_macro (in + 1);
if (pmacro)
{
pmacro = lookup_macro (in + 1);
if (pmacro)
{
@@
-699,7
+699,7
@@
expand_string (const char *in, int first_only)
while (*in == ' ') ++in;
if (*in != '(')
{
while (*in == ' ') ++in;
if (*in != '(')
{
- state = IN_TEXT;
+ state = IN_TEXT;
pmacro = NULL;
}
else
pmacro = NULL;
}
else
@@
-708,7
+708,7
@@
expand_string (const char *in, int first_only)
narg = 0;
args[narg].start = in + 1;
args[narg].len = 0;
narg = 0;
args[narg].start = in + 1;
args[narg].len = 0;
- mark = in + 1;
+ mark = in + 1;
}
}
}
}
}
}
@@
-746,11
+746,12
@@
expand_string (const char *in, int first_only)
break;
case '(':
depth++;
break;
case '(':
depth++;
+ /* Fall through. */
default:
args[narg].len++;
default:
args[narg].len++;
- break;
+ break;
}
}
- }
+ }
else
{
if (*in == ')')
else
{
if (*in == ')')
@@
-758,14
+759,14
@@
expand_string (const char *in, int first_only)
if (narg > -1)
args[narg].len++;
}
if (narg > -1)
args[narg].len++;
}
-
+
}
++in;
}
}
++in;
}
-
+
if (mark != in)
result = str_append (result, mark, in - mark);
if (mark != in)
result = str_append (result, mark, in - mark);
-
+
return result;
}
return result;
}
@@
-804,19
+805,18
@@
mep_cgen_expand_macros_and_parse_operand (CGEN_CPU_DESC cd, int opindex,
{
if (strstr (*strp_in, str))
/* A macro-expansion was pulled off the front. */
{
if (strstr (*strp_in, str))
/* A macro-expansion was pulled off the front. */
- *strp_in = strstr (*strp_in, str);
+ *strp_in = strstr (*strp_in, str);
else
/* A non-macro-expansion was pulled off the front. */
else
/* A non-macro-expansion was pulled off the front. */
- *strp_in += (str - hold);
+ *strp_in += (str - hold);
}
}
- if (hold)
- free (hold);
+ free (hold);
return errmsg;
}
return errmsg;
}
-#define CGEN_ASM_INIT_HOOK (cd->parse_operand = mep_cgen_expand_macros_and_parse_operand);
+#define CGEN_ASM_INIT_HOOK (cd->parse_operand = mep_cgen_expand_macros_and_parse_operand);
/* -- dis.c */
/* -- dis.c */
@@
-1283,14
+1283,16
@@
mep_cgen_parse_operand (CGEN_CPU_DESC cd,
default :
/* xgettext:c-format */
default :
/* xgettext:c-format */
- fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex);
+ opcodes_error_handler
+ (_("internal error: unrecognized field %d while parsing"),
+ opindex);
abort ();
}
return errmsg;
}
abort ();
}
return errmsg;
}
-cgen_parse_fn * const mep_cgen_parse_handlers[] =
+cgen_parse_fn * const mep_cgen_parse_handlers[] =
{
parse_insn_normal,
};
{
parse_insn_normal,
};
@@
-1320,9
+1322,9
@@
CGEN_ASM_INIT_HOOK
Returns NULL for success, an error message for failure. */
Returns NULL for success, an error message for failure. */
-char *
+char *
mep_cgen_build_insn_regex (CGEN_INSN *insn)
mep_cgen_build_insn_regex (CGEN_INSN *insn)
-{
+{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
char rxbuf[CGEN_MAX_RX_ELEMENTS];
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
char rxbuf[CGEN_MAX_RX_ELEMENTS];
@@
-1361,18
+1363,18
@@
mep_cgen_build_insn_regex (CGEN_INSN *insn)
/* Copy any remaining literals from the syntax string into the rx. */
for(; * syn != 0 && rx <= rxbuf + (CGEN_MAX_RX_ELEMENTS - 7 - 4); ++syn)
{
/* Copy any remaining literals from the syntax string into the rx. */
for(; * syn != 0 && rx <= rxbuf + (CGEN_MAX_RX_ELEMENTS - 7 - 4); ++syn)
{
- if (CGEN_SYNTAX_CHAR_P (* syn))
+ if (CGEN_SYNTAX_CHAR_P (* syn))
{
char c = CGEN_SYNTAX_CHAR (* syn);
{
char c = CGEN_SYNTAX_CHAR (* syn);
- switch (c)
+ switch (c)
{
/* Escape any regex metacharacters in the syntax. */
{
/* Escape any regex metacharacters in the syntax. */
- case '.': case '[': case '\\':
- case '*': case '^': case '$':
+ case '.': case '[': case '\\':
+ case '*': case '^': case '$':
#ifdef CGEN_ESCAPE_EXTENDED_REGEX
#ifdef CGEN_ESCAPE_EXTENDED_REGEX
- case '?': case '{': case '}':
+ case '?': case '{': case '}':
case '(': case ')': case '*':
case '|': case '+': case ']':
#endif
case '(': case ')': case '*':
case '|': case '+': case ']':
#endif
@@
-1402,20
+1404,20
@@
mep_cgen_build_insn_regex (CGEN_INSN *insn)
}
/* Trailing whitespace ok. */
}
/* Trailing whitespace ok. */
- * rx++ = '[';
- * rx++ = ' ';
- * rx++ = '\t';
- * rx++ = ']';
- * rx++ = '*';
+ * rx++ = '[';
+ * rx++ = ' ';
+ * rx++ = '\t';
+ * rx++ = ']';
+ * rx++ = '*';
/* But anchor it after that. */
/* But anchor it after that. */
- * rx++ = '$';
+ * rx++ = '$';
* rx = '\0';
CGEN_INSN_RX (insn) = xmalloc (sizeof (regex_t));
reg_err = regcomp ((regex_t *) CGEN_INSN_RX (insn), rxbuf, REG_NOSUB);
* rx = '\0';
CGEN_INSN_RX (insn) = xmalloc (sizeof (regex_t));
reg_err = regcomp ((regex_t *) CGEN_INSN_RX (insn), rxbuf, REG_NOSUB);
- if (reg_err == 0)
+ if (reg_err == 0)
return NULL;
else
{
return NULL;
else
{
@@
-1614,7
+1616,7
@@
mep_cgen_assemble_insn (CGEN_CPU_DESC cd,
const CGEN_INSN *insn = ilist->insn;
recognized_mnemonic = 1;
const CGEN_INSN *insn = ilist->insn;
recognized_mnemonic = 1;
-#ifdef CGEN_VALIDATE_INSN_SUPPORTED
+#ifdef CGEN_VALIDATE_INSN_SUPPORTED
/* Not usually needed as unsupported opcodes
shouldn't be in the hash lists. */
/* Is this insn supported by the selected cpu? */
/* Not usually needed as unsupported opcodes
shouldn't be in the hash lists. */
/* Is this insn supported by the selected cpu? */
@@
-1674,7
+1676,7
@@
mep_cgen_assemble_insn (CGEN_CPU_DESC cd,
if (strlen (start) > 50)
/* xgettext:c-format */
sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
if (strlen (start) > 50)
/* xgettext:c-format */
sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
+ else
/* xgettext:c-format */
sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
}
/* xgettext:c-format */
sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
}
@@
-1683,11
+1685,11
@@
mep_cgen_assemble_insn (CGEN_CPU_DESC cd,
if (strlen (start) > 50)
/* xgettext:c-format */
sprintf (errbuf, _("bad instruction `%.50s...'"), start);
if (strlen (start) > 50)
/* xgettext:c-format */
sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
+ else
/* xgettext:c-format */
sprintf (errbuf, _("bad instruction `%.50s'"), start);
}
/* xgettext:c-format */
sprintf (errbuf, _("bad instruction `%.50s'"), start);
}
-
+
*errmsg = errbuf;
return NULL;
}
*errmsg = errbuf;
return NULL;
}
This page took
0.028881 seconds
and
4
git commands to generate.