mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 16:38:05 +08:00
Cleanups for z8k target
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2001-08-01 Christian Groessler <cpg@aladdin.de>
|
||||||
|
|
||||||
|
* config/tc-z8k.c (parse_reg): If a string starts with "r", "rl",
|
||||||
|
"rh", "rr", "rq", or "sp" then don't automatically assume
|
||||||
|
it's a register name. Check whether there is a number
|
||||||
|
following.
|
||||||
|
|
||||||
2001-08-01 Alan Modra <amodra@bigpond.net.au>
|
2001-08-01 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* config/tc-i386.c (lex_got): Match lower case relocation tokens.
|
* config/tc-i386.c (lex_got): Match lower case relocation tokens.
|
||||||
|
@ -259,7 +259,7 @@ parse_reg (src, mode, reg)
|
|||||||
char *res = 0;
|
char *res = 0;
|
||||||
char regno;
|
char regno;
|
||||||
|
|
||||||
if (src[0] == 's' && src[1] == 'p')
|
if (src[0] == 's' && src[1] == 'p' && (src[2] == 0 || src[2] == ','))
|
||||||
{
|
{
|
||||||
if (segmented_mode)
|
if (segmented_mode)
|
||||||
{
|
{
|
||||||
@ -277,6 +277,8 @@ parse_reg (src, mode, reg)
|
|||||||
{
|
{
|
||||||
if (src[1] == 'r')
|
if (src[1] == 'r')
|
||||||
{
|
{
|
||||||
|
if (src[2] < '0' || src[2] > '9')
|
||||||
|
return res; /* Assume no register name but a label starting with 'rr'. */
|
||||||
*mode = CLASS_REG_LONG;
|
*mode = CLASS_REG_LONG;
|
||||||
res = whatreg (reg, src + 2);
|
res = whatreg (reg, src + 2);
|
||||||
regno = *reg;
|
regno = *reg;
|
||||||
@ -285,6 +287,8 @@ parse_reg (src, mode, reg)
|
|||||||
}
|
}
|
||||||
else if (src[1] == 'h')
|
else if (src[1] == 'h')
|
||||||
{
|
{
|
||||||
|
if (src[2] < '0' || src[2] > '9')
|
||||||
|
return res; /* Assume no register name but a label starting with 'rh'. */
|
||||||
*mode = CLASS_REG_BYTE;
|
*mode = CLASS_REG_BYTE;
|
||||||
res = whatreg (reg, src + 2);
|
res = whatreg (reg, src + 2);
|
||||||
regno = *reg;
|
regno = *reg;
|
||||||
@ -293,6 +297,8 @@ parse_reg (src, mode, reg)
|
|||||||
}
|
}
|
||||||
else if (src[1] == 'l')
|
else if (src[1] == 'l')
|
||||||
{
|
{
|
||||||
|
if (src[2] < '0' || src[2] > '9')
|
||||||
|
return res; /* Assume no register name but a label starting with 'rl'. */
|
||||||
*mode = CLASS_REG_BYTE;
|
*mode = CLASS_REG_BYTE;
|
||||||
res = whatreg (reg, src + 2);
|
res = whatreg (reg, src + 2);
|
||||||
regno = *reg;
|
regno = *reg;
|
||||||
@ -302,6 +308,8 @@ parse_reg (src, mode, reg)
|
|||||||
}
|
}
|
||||||
else if (src[1] == 'q')
|
else if (src[1] == 'q')
|
||||||
{
|
{
|
||||||
|
if (src[2] < '0' || src[2] > '9')
|
||||||
|
return res; /* Assume no register name but a label starting with 'rq'. */
|
||||||
*mode = CLASS_REG_QUAD;
|
*mode = CLASS_REG_QUAD;
|
||||||
res = whatreg (reg, src + 2);
|
res = whatreg (reg, src + 2);
|
||||||
regno = *reg;
|
regno = *reg;
|
||||||
@ -310,6 +318,8 @@ parse_reg (src, mode, reg)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (src[1] < '0' || src[1] > '9')
|
||||||
|
return res; /* Assume no register name but a label starting with 'r'. */
|
||||||
*mode = CLASS_REG_WORD;
|
*mode = CLASS_REG_WORD;
|
||||||
res = whatreg (reg, src + 1);
|
res = whatreg (reg, src + 1);
|
||||||
regno = *reg;
|
regno = *reg;
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2001-08-01 Christian Groessler <cpg@aladdin.de>
|
||||||
|
|
||||||
|
* z8kgen.c: Fixed indentation of opt[] array. Include stdio.h to
|
||||||
|
get stderr definition.
|
||||||
|
(internal, gas): Removed warnings.
|
||||||
|
(gas): Create a correct final entry for created array.
|
||||||
|
* z8k-opc.h: Recreated with new z8kgen.
|
||||||
|
|
||||||
2001-07-28 Kazu Hirata <kazu@hxi.com>
|
2001-07-28 Kazu Hirata <kazu@hxi.com>
|
||||||
|
|
||||||
* i386-dis.c: Fix formatting.
|
* i386-dis.c: Fix formatting.
|
||||||
|
@ -4467,5 +4467,13 @@ opcode_entry_type z8k_table[] = {
|
|||||||
#endif
|
#endif
|
||||||
"xorb",OPC_xorb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
|
"xorb",OPC_xorb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
|
||||||
{CLASS_BIT+8,CLASS_BIT+8,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,420},
|
{CLASS_BIT+8,CLASS_BIT+8,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,420},
|
||||||
0,0};
|
|
||||||
|
/* end marker */
|
||||||
|
{
|
||||||
|
#ifdef NICENAMES
|
||||||
|
NULL,0,0,
|
||||||
|
0,
|
||||||
|
#endif
|
||||||
|
NULL,0,0,{0,0,0,0},{0,0,0,0,0,0,0,0,0,0},0,0,0}
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
/* This program generates z8k-opc.h */
|
/* This program generates z8k-opc.h */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include "sysdep.h"
|
#include "sysdep.h"
|
||||||
|
|
||||||
#define BYTE_INFO_LEN 10
|
#define BYTE_INFO_LEN 10
|
||||||
@ -703,7 +704,6 @@ struct tok_struct toks[] =
|
|||||||
"01ii", "CLASS_01II", 1,
|
"01ii", "CLASS_01II", 1,
|
||||||
"00ii", "CLASS_00II", 1,
|
"00ii", "CLASS_00II", 1,
|
||||||
0, 0
|
0, 0
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
char *
|
char *
|
||||||
@ -899,7 +899,7 @@ void
|
|||||||
internal ()
|
internal ()
|
||||||
{
|
{
|
||||||
int c = count ();
|
int c = count ();
|
||||||
struct op *new = xmalloc (sizeof (struct op) * c);
|
struct op *new = (struct op *) xmalloc (sizeof (struct op) * c);
|
||||||
struct op *p = opt;
|
struct op *p = opt;
|
||||||
memcpy (new, p, c * sizeof (struct op));
|
memcpy (new, p, c * sizeof (struct op));
|
||||||
|
|
||||||
@ -958,7 +958,7 @@ gas ()
|
|||||||
struct op *p = opt;
|
struct op *p = opt;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
char *oldname = "";
|
char *oldname = "";
|
||||||
struct op *new = xmalloc (sizeof (struct op) * c);
|
struct op *new = (struct op *) xmalloc (sizeof (struct op) * c);
|
||||||
|
|
||||||
memcpy (new, p, c * sizeof (struct op));
|
memcpy (new, p, c * sizeof (struct op));
|
||||||
|
|
||||||
@ -1278,7 +1278,9 @@ gas ()
|
|||||||
printf ("},\n");
|
printf ("},\n");
|
||||||
new++;
|
new++;
|
||||||
}
|
}
|
||||||
printf ("0,0};\n");
|
printf ("\n/* end marker */\n");
|
||||||
|
printf ("{\n#ifdef NICENAMES\nNULL,0,0,\n0,\n#endif\n");
|
||||||
|
printf ("NULL,0,0,{0,0,0,0},{0,0,0,0,0,0,0,0,0,0},0,0,0}\n};\n");
|
||||||
printf ("#endif\n");
|
printf ("#endif\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user