aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>1998-02-20 20:48:39 +0000
committerDoug Evans <dje@google.com>1998-02-20 20:48:39 +0000
commitd3c6610c001f9114f3264f66151c0f267f311492 (patch)
treeb31bfde87d17a45571883c67754a836a89a40090
parentc634d13e1871ba22a2394034ca7bc36725c0284b (diff)
downloadgdb-d3c6610c001f9114f3264f66151c0f267f311492.zip
gdb-d3c6610c001f9114f3264f66151c0f267f311492.tar.gz
gdb-d3c6610c001f9114f3264f66151c0f267f311492.tar.bz2
* confirg/tc-dvp.c (md_assemble): Handle ASM_DIRECT state.
(dvp_parse_done): Comment out contents. (s_enddirect,s_endmpg,s_endunpack): Call demand_empty_rest_of_line. (s_state): Handle .vu in included file.
-rw-r--r--gas/ChangeLog9
-rw-r--r--gas/config/tc-dvp.c83
2 files changed, 27 insertions, 65 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 37ff749..b1bd0b0 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,12 @@
+start-sanitize-sky
+Fri Feb 20 12:43:02 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * confirg/tc-dvp.c (md_assemble): Handle ASM_DIRECT state.
+ (dvp_parse_done): Comment out contents.
+ (s_enddirect,s_endmpg,s_endunpack): Call demand_empty_rest_of_line.
+ (s_state): Handle .vu in included file.
+
+end-sanitize-sky
Fri Feb 20 15:03:13 1998 Ian Lance Taylor <ian@cygnus.com>
* config/tc-ppc.c (md_pseudo_table): Add "section".
diff --git a/gas/config/tc-dvp.c b/gas/config/tc-dvp.c
index 0718731..38a65ef 100644
--- a/gas/config/tc-dvp.c
+++ b/gas/config/tc-dvp.c
@@ -154,7 +154,6 @@ static void s_dmadata PARAMS ((int));
static void s_enddmadata PARAMS ((int));
static void s_dmapackvif PARAMS ((int));
static void s_enddirect PARAMS ((int));
-static void s_endgif PARAMS ((int));
static void s_endmpg PARAMS ((int));
static void s_endunpack PARAMS ((int));
static void s_state PARAMS ((int));
@@ -167,7 +166,6 @@ const pseudo_typeS md_pseudo_table[] =
{ "dmapackvif", s_dmapackvif, 0 },
{ "enddirect", s_enddirect, 0 },
{ "enddmadata", s_enddmadata, 0 },
- { "endgif", s_endgif, 0 },
{ "endmpg", s_endmpg, 0 },
{ "endunpack", s_endunpack, 0 },
/* .vu added to simplify debugging and creation of input files */
@@ -254,6 +252,8 @@ md_assemble (str)
else
assemble_vif (str);
}
+ else if (cur_asm_state == ASM_DIRECT)
+ assemble_gif (str);
else if (cur_asm_state == ASM_VU
|| cur_asm_state == ASM_MPG)
assemble_vu (str);
@@ -848,6 +848,8 @@ md_undefined_symbol (name)
void
dvp_parse_done ()
{
+#if 0 /* ??? Doesn't work unless we keep track of the nested include file
+ level. */
/* Check for missing .EndMpg, and supply one if necessary. */
if (cur_asm_state == ASM_MPG)
s_endmpg (0);
@@ -855,6 +857,7 @@ dvp_parse_done ()
s_enddirect (0);
else if (cur_asm_state == ASM_UNPACK)
s_endunpack (0);
+#endif
}
/* Functions concerning relocs. */
@@ -1376,64 +1379,6 @@ parse_dma_addr_autocount (opcode, operand, mods, insn_buf, pstr, errmsg)
*pstr = end;
return retval;
}
-
-/* Parse a DMA data spec which can be either of '*' or a quad word count. */
-
-static int
-parse_dma_count (pstr, errmsg)
- char **pstr;
- const char **errmsg;
-{
- char *str = *pstr;
- long count, value;
- expressionS exp;
-
- if (*str == '*')
- {
- ++*pstr;
- /* -1 is a special marker to caller to tell it the count is to be
- computed from the data. */
- return -1;
- }
-
- expression (&exp);
- if (exp.X_op == O_illegal
- || exp.X_op == O_absent)
- ;
- else if (exp.X_op == O_constant)
- value = exp.X_add_number;
- else if (exp.X_op == O_register)
- as_fatal ("got O_register");
- else
- {
- /* We need to generate a fixup for this expression. */
- if (fixup_count >= MAX_FIXUPS )
- as_fatal ("too many fixups");
- fixups[fixup_count].exp = exp;
- fixups[fixup_count].opindex = 0 /*FIXME*/;
- fixups[fixup_count].offset = 0 /*FIXME*/;
- ++fixup_count;
- value = 0;
- }
-
- if (isdigit( *str)) /* ????????needs to accept an expression*/
- {
- char *start = str;
- while (*str && *str != ',')
- ++str;
- if (*str != ',')
- {
- *errmsg = "invalid dma count";
- return 0;
- }
- count = atoi (start);
- *pstr = str;
- return (count);
- }
-
- *errmsg = "invalid dma count";
- return 0;
-}
/* Return length in bytes of the variable length VIF insn
currently being assembled. */
@@ -1770,6 +1715,8 @@ s_enddirect (ignore)
cur_varlen_frag = NULL;
cur_varlen_insn = NULL;
cur_varlen_value = 0;
+
+ demand_empty_rest_of_line ();
}
static void
@@ -1800,6 +1747,8 @@ s_endmpg (ignore)
/* Update $.MpgLoc. */
vif_set_mpgloc (vif_get_mpgloc () + byte_len);
+
+ demand_empty_rest_of_line ();
}
static void
@@ -1831,17 +1780,21 @@ s_endunpack (ignore)
/* Update $.UnpackLoc. */
vif_set_unpackloc (vif_get_unpackloc () + byte_len);
+
+ demand_empty_rest_of_line ();
}
static void
s_state (state)
int state;
{
+ /* If in MPG state and the user requests to change to VU state,
+ leave the state as MPG. This happens when we see an mpg followed
+ by a .include that has .vu. */
+ if (cur_asm_state == ASM_MPG && state == ASM_VU)
+ return;
+
cur_asm_state = state;
-}
-static void
-s_endgif (ignore)
- int ignore;
-{
+ demand_empty_rest_of_line ();
}