/* tc-score.c -- Assembler for Score
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2017 Free Software Foundation, Inc.
Contributed by:
Brain.lin (brain.lin@sunplusct.com)
Mei Ligang (ligang@sunnorth.com.cn)
static const struct s3_insn_to_dependency s3_insn_to_dependency_table[] =
{
- /* move spectial instruction. */
+ /* move special instruction. */
{"mtcr", s3_D_mtcr},
};
static const struct s3_data_dependency s3_data_dependency_table[] =
{
- /* Status regiser. */
+ /* Status register. */
{s3_D_mtcr, "cr0", s3_D_all_insn, "", 5, 1, 0},
};
{
if ((reg == 1) && (s3_nor1 == 1) && (s3_inst.bwarn == 0))
{
- as_warn (_("Using temp register(r1)"));
+ as_warn (_("Using temp register (r1)"));
s3_inst.bwarn = 1;
}
}
/* Restore the start point, we may have got a reg of the wrong class. */
*str = start;
- sprintf (buff, _("low register(r0-r15)expected, not '%.100s'"), start);
+ sprintf (buff, _("low register (r0-r15) expected, not '%.100s'"), start);
s3_inst.error = buff;
return (int) s3_FAIL;
}
if (remainder_bubbles <= 2)
{
if (s3_warn_fix_data_dependency)
- as_warn (_("Fix data dependency: %s %s -- %s %s (insert %d nop!/%d)"),
+ as_warn (_("Fix data dependency: %s %s -- %s %s (insert %d nop!/%d)"),
s3_dependency_vector[i].name, s3_dependency_vector[i].reg,
s3_dependency_vector[0].name, s3_dependency_vector[0].reg,
remainder_bubbles, bubbles);
else
{
if (s3_warn_fix_data_dependency)
- as_warn (_("Fix data dependency: %s %s -- %s %s (insert 1 pflush/%d)"),
+ as_warn (_("Fix data dependency: %s %s -- %s %s (insert 1 pflush/%d)"),
s3_dependency_vector[i].name, s3_dependency_vector[i].reg,
s3_dependency_vector[0].name, s3_dependency_vector[0].reg,
bubbles);
{
if (warn_or_error)
{
- as_bad (_("data dependency: %s %s -- %s %s (%d/%d bubble)"),
+ as_bad (_("data dependency: %s %s -- %s %s (%d/%d bubble)"),
s3_dependency_vector[i].name, s3_dependency_vector[i].reg,
s3_dependency_vector[0].name, s3_dependency_vector[0].reg,
remainder_bubbles, bubbles);
}
else
{
- as_warn (_("data dependency: %s %s -- %s %s (%d/%d bubble)"),
+ as_warn (_("data dependency: %s %s -- %s %s (%d/%d bubble)"),
s3_dependency_vector[i].name, s3_dependency_vector[i].reg,
s3_dependency_vector[0].name, s3_dependency_vector[0].reg,
remainder_bubbles, bubbles);
/* Here, we must call frag_grow in order to keep the instruction frag type is
rs_machine_dependent.
For, frag_var may change frag_now->fr_type to rs_fill by calling frag_grow which
- acturally will call frag_wane.
+ actually will call frag_wane.
Calling frag_grow first will create a new frag_now which free size is 20 that is enough
for frag_var. */
frag_grow (20);
return;
/* 0: indicate 32.
- 1: invalide value.
+ 1: invalid value.
2: to 31: normal value. */
val = s3_inst.instruction & 0x1f;
if (val == 1)
return;
/* 0: indicate 32.
- 1: invalide value.
+ 1: invalid value.
2: to 31: normal value. */
val = s3_inst.instruction & 0x1f;
if (val == 1)
/* Var part
For a local symbol: ldis r1, HI%<constant>
- but, if lo is outof 16 bit, make hi plus 1 */
+ but, if lo is out of 16 bit, make hi plus 1 */
if ((lo < -0x8000) || (lo > 0x7fff))
{
hi += 1;
else if (!(s3_inst.reloc.exp.X_add_number >= -524288
&& s3_inst.reloc.exp.X_add_number <= 524287))
{
- s3_inst.error = _("invalid constant: 20 bit expression not in range -2^19..2^19");
+ s3_inst.error = _("invalid constant: 20 bit expression not in range -2^19..2^19-1");
return;
}
|| ((pec_part_1.size == s3_INSN_SIZE) && (s3_inst.size == s3_INSN16_SIZE))
|| ((pec_part_1.size == s3_INSN16_SIZE) && (s3_inst.size == s3_INSN_SIZE)))
{
- s3_inst.error = _("pce instruction error (16 bit || 16 bit)'");
+ s3_inst.error = _("pce instruction error (16 bit || 16 bit).");
sprintf (s3_inst.str, "%s", insnstr);
return;
}
if (change == 1)
{
/* Only at the first time determining whether s3_GP instruction relax should be done,
- return the difference between insntruction size and instruction relax size. */
+ return the difference between instruction size and instruction relax size. */
if (fragp->fr_opcode == NULL)
{
fragp->fr_fix = s3_RELAX_NEW (fragp->fr_subtype);
value = offset + symbol_address - frag_addr;
/* change the order of judging rule is because
- 1.not defined symbol or common sysbol or external symbol will change
+ 1.not defined symbol or common symbol or external symbol will change
bcmp to cmp!+beq/bne ,here need to record fragp->fr_opcode
2.if the flow is as before : it will results to recursive loop
*/
/* Have already relaxed! Just return 0 to terminate the loop. */
return 0;
}
- /* need to translate when extern or not defind or common sysbol */
+ /* need to translate when extern or not defined or common symbol */
else if ((relaxable_p
&& (!((value & 0xfffffe00) == 0 || (value & 0xfffffe00) == 0xfffffe00))
&& fragp->fr_fix == 4
if ((value & 0xfffffe00) != 0 && (value & 0xfffffe00) != 0xfffffe00)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- _(" branch relocation truncate (0x%x) [-2^9 ~ 2^9]"), (unsigned int)value);
+ _(" branch relocation truncate (0x%x) [-2^9 ~ 2^9-1]"), (unsigned int) value);
return;
}
content = s3_md_chars_to_number (buf, s3_INSN16_SIZE);
if ((value & 0xfff80000) != 0 && (value & 0xfff80000) != 0xfff80000)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- _(" branch relocation truncate (0x%x) [-2^19 ~ 2^19]"), (unsigned int)value);
+ _(" branch relocation truncate (0x%x) [-2^19 ~ 2^19-1]"), (unsigned int) value);
return;
}
content = s3_md_chars_to_number (buf, s3_INSN_SIZE);
if ((value & 0xfff80000) != 0 && (value & 0xfff80000) != 0xfff80000)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- _(" branch relocation truncate (0x%x) [-2^19 ~ 2^19]"), (unsigned int)value);
+ _(" branch relocation truncate (0x%x) [-2^19 ~ 2^19-1]"), (unsigned int) value);
return;
}
content = s3_md_chars_to_number (buf, s3_INSN_SIZE);
}
else
{
- /* In differnt section. */
+ /* In different section. */
if ((S_GET_SEGMENT (fixP->fx_addsy) != seg) ||
(fixP->fx_addsy != NULL && S_IS_EXTERNAL (fixP->fx_addsy)))
value = fixP->fx_offset;
if ((value & 0xfffffe00) != 0 && (value & 0xfffffe00) != 0xfffffe00)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- _(" branch relocation truncate (0x%x) [-2^9 ~ 2^9]"), (unsigned int)value);
+ _(" branch relocation truncate (0x%x) [-2^9 ~ 2^9-1]"), (unsigned int) value);
return;
}
if ((value & 0xfff80000) != 0 && (value & 0xfff80000) != 0xfff80000)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- _(" branch relocation truncate (0x%x) [-2^19 ~ 2^19]"), (unsigned int)value);
+ _(" branch relocation truncate (0x%x) [-2^19 ~ 2^19-1]"), (unsigned int) value);
return;
}
if ((value & 0xfffffe00) != 0 && (value & 0xfffffe00) != 0xfffffe00)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- _(" branch relocation truncate (0x%x) [-2^9 ~ 2^9]"), (unsigned int)value);
+ _(" branch relocation truncate (0x%x) [-2^9 ~ 2^9-1]"), (unsigned int) value);
return;
}
#endif
fprintf (fp, _("\
- -FIXDD\t\tassemble code for fix data dependency\n"));
+ -FIXDD\t\tfix data dependencies\n"));
fprintf (fp, _("\
- -NWARN\t\tassemble code for no warning message for fix data dependency\n"));
+ -NWARN\t\tdo not print warning message when fixing data dependencies\n"));
fprintf (fp, _("\
- -SCORE5\t\tassemble code for target is SCORE5\n"));
+ -SCORE5\t\tassemble code for target SCORE5\n"));
fprintf (fp, _("\
- -SCORE5U\tassemble code for target is SCORE5U\n"));
+ -SCORE5U\tassemble code for target SCORE5U\n"));
fprintf (fp, _("\
- -SCORE7\t\tassemble code for target is SCORE7, this is default setting\n"));
+ -SCORE7\t\tassemble code for target SCORE7 [default]\n"));
fprintf (fp, _("\
- -SCORE3\t\tassemble code for target is SCORE3\n"));
+ -SCORE3\t\tassemble code for target SCORE3\n"));
fprintf (fp, _("\
- -march=score7\tassemble code for target is SCORE7, this is default setting\n"));
+ -march=score7\tassemble code for target SCORE7 [default]\n"));
fprintf (fp, _("\
- -march=score3\tassemble code for target is SCORE3\n"));
+ -march=score3\tassemble code for target SCORE3\n"));
fprintf (fp, _("\
-USE_R1\t\tassemble code for no warning message when using temp register r1\n"));
fprintf (fp, _("\
- -KPIC\t\tassemble code for PIC\n"));
+ -KPIC\t\tgenerate PIC\n"));
fprintf (fp, _("\
- -O0\t\tassembler will not perform any optimizations\n"));
+ -O0\t\tdo not perform any optimizations\n"));
fprintf (fp, _("\
- -G gpnum\tassemble code for setting gpsize and default is 8 byte\n"));
+ -G gpnum\tassemble code for setting gpsize, default is 8 bytes\n"));
fprintf (fp, _("\
- -V \t\tSunplus release version \n"));
+ -V \t\tSunplus release version\n"));
}