* config/tc-dvp.h (TC_START_LABEL): Define.

* config/tc-dvp.c (force_mach_label): New function.
	(md_begin,create_colon_label,s_dmadata): Use it.
This commit is contained in:
Doug Evans
1998-03-17 22:10:10 +00:00
parent 1de230de3e
commit 3b4389e23e
2 changed files with 25 additions and 5 deletions

View File

@ -10,6 +10,10 @@ Tue Mar 17 10:40:54 1998 Doug Evans <devans@canuck.cygnus.com>
(assemble_dma): Only output 8 bytes for actual dma insn if dma/vif
packing is enabled. Emit VIF cpu marker after dma insn.
* config/tc-dvp.h (TC_START_LABEL): Define.
* config/tc-dvp.c (force_mach_label): New function.
(md_begin,create_colon_label,s_dmadata): Use it.
Mon Mar 16 10:19:44 1998 Doug Evans <devans@canuck.cygnus.com>
* config/tc-dvp.c (md_pseudo_table): Make .quad 16 bytes.

View File

@ -116,6 +116,9 @@ static void set_asm_state PARAMS ((asm_state));
static dvp_cpu cur_cpu;
/* Record the current mach type. */
static void record_mach PARAMS ((dvp_cpu, int));
/* Force emission of mach type label at next insn.
This isn't static as TC_START_LABEL uses it. */
int force_mach_label PARAMS ((void));
/* Given a dvp_cpu value, return the STO_DVP value to use. */
static int cpu_sto PARAMS ((dvp_cpu, const char **));
@ -235,9 +238,8 @@ md_begin ()
This involves computing the hash chains. */
dvp_opcode_init_tables (0);
/* Set the current mach to an illegal value to force a label for the
first insn. */
cur_cpu = DVP_UNKNOWN;
/* Force a mach type label for the first insn. */
force_mach_label ();
/* Initialize the parsing state. */
cur_state_index = 0;
@ -1076,6 +1078,17 @@ record_mach (cpu, force_next_p)
cur_cpu = cpu;
}
/* Force emission of mach type label at next insn.
This isn't static as TC_START_LABEL uses it.
The result is the value of TC_START_LABEL. */
int
force_mach_label ()
{
cur_cpu = DVP_UNKNOWN;
return 1;
}
/* Push/pop the current parsing state. */
static void
@ -1601,7 +1614,7 @@ create_label (prefix, name)
/* Create a label named by concatenating PREFIX to NAME,
and define it as `.'.
STO, if non-zero, is the st_other value to assign to this label.
If STO is zero `cur_cpu' is set to DVP_UNKNOWN to force record_mach to
If STO is zero `cur_cpu', call force_mach_label to force record_mach to
emit a cpu label. Otherwise the disassembler gets confused. */
static symbolS *
@ -1621,7 +1634,7 @@ create_colon_label (sto, prefix, name)
if (sto)
S_SET_OTHER (result, sto);
else
cur_cpu = DVP_UNKNOWN;
force_mach_label ();
free (fullname);
return result;
}
@ -2103,6 +2116,9 @@ s_dmadata (ignore)
dma_data_name = S_GET_NAME (line_label);
*input_line_pointer = c;
/* Force emission of a machine type label for the next insn. */
force_mach_label ();
demand_empty_rest_of_line ();
}