aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1996-11-19 20:35:19 +0000
committerJeff Law <law@redhat.com>1996-11-19 20:35:19 +0000
commit7f02192d13ea68e9b8a8466e31b57e182aadc5e2 (patch)
tree92aa70c4fd212b0ab66afcc0091e6afa9b873d87
parent99246e03f9f878fae22e87438af055059fac8ccb (diff)
downloadfsf-binutils-gdb-7f02192d13ea68e9b8a8466e31b57e182aadc5e2.zip
fsf-binutils-gdb-7f02192d13ea68e9b8a8466e31b57e182aadc5e2.tar.gz
fsf-binutils-gdb-7f02192d13ea68e9b8a8466e31b57e182aadc5e2.tar.bz2
* config/tc-mn10300.c (md_assemble): Handle MN10300_OPERAND_REG_LIST.
So GCC can use movm in prologue/epilogues.
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/config/tc-mn10300.c74
2 files changed, 76 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index fe76333..a98f085 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+Tue Nov 19 13:35:22 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_assemble): Handle MN10300_OPERAND_REG_LIST.
+
Mon Nov 18 15:26:55 1996 Jeffrey A Law (law@cygnus.com)
* config/tc-mn10300.c (mn10300_insert_operand): Provide prototype
diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c
index 02f78b1..53b5ddb 100644
--- a/gas/config/tc-mn10300.c
+++ b/gas/config/tc-mn10300.c
@@ -465,7 +465,7 @@ md_assemble (str)
errmsg = NULL;
- while (*str == ' ' || *str == ',' || *str == '[' || *str == ']')
+ while (*str == ' ' || *str == ',')
++str;
/* Gather the operand. */
@@ -547,6 +547,76 @@ md_assemble (str)
*input_line_pointer = c;
goto keep_going;
}
+ else if (operand->flags & MN10300_OPERAND_REG_LIST)
+ {
+ unsigned int value = 0;
+ if (*input_line_pointer != '[')
+ {
+ input_line_pointer = hold;
+ str = hold;
+ goto error;
+ }
+
+ /* Eat the '['. */
+ input_line_pointer++;
+
+ /* A null register list can not be specified. */
+ if (*input_line_pointer == ']')
+ {
+ input_line_pointer = hold;
+ str = hold;
+ goto error;
+ }
+
+ while (*input_line_pointer != ']')
+ {
+ char *start;
+ char c;
+
+ if (*input_line_pointer == ',')
+ input_line_pointer++;
+
+ start = input_line_pointer;
+ c = get_symbol_end ();
+
+ if (strcmp (start, "d2") == 0)
+ {
+ value |= 0x80;
+ *input_line_pointer = c;
+ }
+ else if (strcmp (start, "d3") == 0)
+ {
+ value |= 0x40;
+ *input_line_pointer = c;
+ }
+ else if (strcmp (start, "a2") == 0)
+ {
+ value |= 0x20;
+ *input_line_pointer = c;
+ }
+ else if (strcmp (start, "a3") == 0)
+ {
+ value |= 0x10;
+ *input_line_pointer = c;
+ }
+ else if (strcmp (start, "other") == 0)
+ {
+ value |= 0x08;
+ *input_line_pointer = c;
+ }
+ else
+ {
+ input_line_pointer = hold;
+ str = hold;
+ goto error;
+ }
+ }
+ input_line_pointer++;
+ mn10300_insert_operand (&insn, &extension, operand,
+ value, (char *) NULL, 0, 0);
+ goto keep_going;
+
+ }
else if (data_register_name (&ex))
{
input_line_pointer = hold;
@@ -649,7 +719,7 @@ keep_going:
str = input_line_pointer;
input_line_pointer = hold;
- while (*str == ' ' || *str == ',' || *str == '[' || *str == ']')
+ while (*str == ' ' || *str == ',')
++str;
}