* config/tc-mn10300.c (address_registers): Use '%' prefix for regs.

(data_registers, other_registers, md_assemble): Likewise.
This commit is contained in:
Jeff Law 1996-11-25 18:24:14 +00:00
parent 11cd057a41
commit f98905f13d
2 changed files with 19 additions and 16 deletions

View File

@ -1,5 +1,8 @@
Mon Nov 25 08:49:36 1996 Jeffrey A Law (law@cygnus.com)
* config/tc-mn10300.c (address_registers): Use '%' prefix for regs.
(data_registers, other_registers, md_assemble): Likewise.
* config/tc-mn10300.c (md_assemble): Correctly determine the
correct location and type for each relocation.
(md_pcrel_from): Simplify.

View File

@ -96,27 +96,27 @@ static struct hash_control *mn10300_hash;
/* This table is sorted. Suitable for searching by a binary search. */
static const struct reg_name data_registers[] =
{
{ "d0", 0 },
{ "d1", 1 },
{ "d2", 2 },
{ "d3", 3 },
{ "%d0", 0 },
{ "%d1", 1 },
{ "%d2", 2 },
{ "%d3", 3 },
};
#define DATA_REG_NAME_CNT (sizeof(data_registers) / sizeof(struct reg_name))
static const struct reg_name address_registers[] =
{
{ "a0", 0 },
{ "a1", 1 },
{ "a2", 2 },
{ "a3", 3 },
{ "%a0", 0 },
{ "%a1", 1 },
{ "%a2", 2 },
{ "%a3", 3 },
};
#define ADDRESS_REG_NAME_CNT (sizeof(address_registers) / sizeof(struct reg_name))
static const struct reg_name other_registers[] =
{
{ "mdr", 0 },
{ "psw", 0 },
{ "sp", 0 },
{ "%mdr", 0 },
{ "%psw", 0 },
{ "%sp", 0 },
};
#define OTHER_REG_NAME_CNT (sizeof(other_registers) / sizeof(struct reg_name))
@ -584,27 +584,27 @@ md_assemble (str)
start = input_line_pointer;
c = get_symbol_end ();
if (strcmp (start, "d2") == 0)
if (strcmp (start, "%d2") == 0)
{
value |= 0x80;
*input_line_pointer = c;
}
else if (strcmp (start, "d3") == 0)
else if (strcmp (start, "%d3") == 0)
{
value |= 0x40;
*input_line_pointer = c;
}
else if (strcmp (start, "a2") == 0)
else if (strcmp (start, "%a2") == 0)
{
value |= 0x20;
*input_line_pointer = c;
}
else if (strcmp (start, "a3") == 0)
else if (strcmp (start, "%a3") == 0)
{
value |= 0x10;
*input_line_pointer = c;
}
else if (strcmp (start, "other") == 0)
else if (strcmp (start, "%other") == 0)
{
value |= 0x08;
*input_line_pointer = c;