for (j = 0; j < ARRAY_SIZE (nios2_fpu_insn); j++)
if (N2FPU_DOUBLE_REQUIRED_P (j) && ! N2FPU_ENABLED_P (j))
{
- error ("switch %<-mcustom-%s%> is required for double "
- "precision floating point", N2FPU_NAME (j));
+ error ("switch %<-mcustom-%s%> is required for "
+ "double-precision floating-point", N2FPU_NAME (j));
errors = true;
}
break;
if (errors || custom_code_conflict)
fatal_error (input_location,
- "conflicting use of %<-mcustom%> switches, target attributes, "
+ "conflicting use of %<-mcustom%> switches, "
+ "target attributes, "
"and/or %<__builtin_custom_%> functions");
}
if (flag_pic)
{
if (nios2_gpopt_option != gpopt_none)
- error ("%<-mgpopt%> not supported with PIC.");
+ error ("%<-mgpopt%> not supported with PIC");
if (nios2_gprel_sec)
- error ("%<-mgprel-sec=%> not supported with PIC.");
+ error ("%<-mgprel-sec=%> not supported with PIC");
if (nios2_r0rel_sec)
- error ("%<-mr0rel-sec=%> not supported with PIC.");
+ error ("%<-mr0rel-sec=%> not supported with PIC");
}
/* Process -mgprel-sec= and -m0rel-sec=. */
{
if (regcomp (&nios2_gprel_sec_regex, nios2_gprel_sec,
REG_EXTENDED | REG_NOSUB))
- error ("%<-mgprel-sec=%> argument is not a valid regular expression.");
+ error ("%<-mgprel-sec=%> argument is not a valid regular expression");
}
if (nios2_r0rel_sec)
{
if (regcomp (&nios2_r0rel_sec_regex, nios2_r0rel_sec,
REG_EXTENDED | REG_NOSUB))
- error ("%<-mr0rel-sec=%> argument is not a valid regular expression.");
+ error ("%<-mr0rel-sec=%> argument is not a valid regular expression");
}
/* If we don't have mul, we don't have mulx either! */
if (N2FPU_N (code) < 0)
fatal_error (input_location,
- "Cannot call %<__builtin_custom_%s%> without specifying switch"
- " %<-mcustom-%s%>", N2FPU_NAME (code), N2FPU_NAME (code));
+ "cannot call %<__builtin_custom_%s%> without specifying "
+ "switch %<-mcustom-%s%>",
+ N2FPU_NAME (code), N2FPU_NAME (code));
if (has_target_p)
create_output_operand (&ops[opno++], target, dst_mode);
else
= build_function_type_list (ret_type, integer_type_node,
op[rhs1].type, op[rhs2].type,
NULL_TREE);
- snprintf (builtin_name + n, 32 - n, "%sn%s%s",
- op[lhs].c, op[rhs1].c, op[rhs2].c);
/* Save copy of parameter string into custom_builtin_name[]. */
- strncpy (custom_builtin_name[builtin_code], builtin_name + n, 5);
+ snprintf (custom_builtin_name[builtin_code], 5, "%sn%s%s",
+ op[lhs].c, op[rhs1].c, op[rhs2].c);
+ strncpy (builtin_name + n, custom_builtin_name[builtin_code], 5);
fndecl =
add_builtin_function (builtin_name, builtin_ftype,
start_code + builtin_code,
if (argno == 0)
{
if (!custom_insn_opcode (value, VOIDmode))
- error ("custom instruction opcode must be compile time "
+ error ("custom instruction opcode must be a compile-time "
"constant in the range 0-255 for %<__builtin_custom_%s%>",
custom_builtin_name[index]);
}
struct expand_operand ops[MAX_RECOG_OPERANDS];
if (!rdwrctl_operand (ctlcode, VOIDmode))
{
- error ("Control register number must be in range 0-31 for %s",
+ error ("control register number must be in range 0-31 for %s",
d->name);
return has_target_p ? gen_reg_rtx (SImode) : const0_rtx;
}
if (!rdwrctl_operand (reg, VOIDmode))
{
- error ("Register number must be in range 0-31 for %s",
+ error ("register number must be in range 0-31 for %s",
d->name);
return gen_reg_rtx (SImode);
}
if (!rdprs_dcache_operand (imm, VOIDmode))
{
- error ("The immediate value must fit into a %d-bit integer for %s",
+ error ("immediate value must fit into a %d-bit integer for %s",
(TARGET_ARCH_R2) ? 12 : 16, d->name);
return gen_reg_rtx (SImode);
}
if (INTVAL (imm) != 0 && INTVAL (imm) != 1)
{
- error ("The ENI instruction operand must be either 0 or 1");
+ error ("the ENI instruction operand must be either 0 or 1");
return const0_rtx;
}
create_integer_operand (&ops[0], INTVAL (imm));
if (d->arch > nios2_arch_option)
{
- error ("Builtin function %s requires Nios II R%d",
+ error ("built-in function %s requires Nios II R%d",
d->name, (int) d->arch);
/* Given it is invalid, just generate a normal call. */
return expand_call (exp, target, ignore);
if (custom_code_status[N] == CCS_FPU && index != custom_code_index[N])
{
custom_code_conflict = true;
- error ("switch %<-mcustom-%s%> conflicts with switch %<-mcustom-%s%>",
+ error ("switch %<-mcustom-%s%> conflicts with "
+ "switch %<-mcustom-%s%>",
N2FPU_NAME (custom_code_index[N]), N2FPU_NAME (index));
}
else if (custom_code_status[N] == CCS_BUILTIN_CALL)
{
custom_code_conflict = true;
- error ("call to %<__builtin_custom_%s%> conflicts with switch "
- "%<-mcustom-%s%>", custom_builtin_name[custom_code_index[N]],
+ error ("call to %<__builtin_custom_%s%> conflicts with "
+ "switch %<-mcustom-%s%>",
+ custom_builtin_name[custom_code_index[N]],
N2FPU_NAME (index));
}
}
if (custom_code_status[N] == CCS_FPU)
{
custom_code_conflict = true;
- error ("call to %<__builtin_custom_%s%> conflicts with switch "
- "%<-mcustom-%s%>", custom_builtin_name[index],
+ error ("call to %<__builtin_custom_%s%> conflicts with "
+ "switch %<-mcustom-%s%>",
+ custom_builtin_name[index],
N2FPU_NAME (custom_code_index[N]));
}
else
char *end_eq = p;
if (no_opt)
{
- error ("custom-fpu-cfg option does not support %<no-%>");
+ error ("%<custom-fpu-cfg%> option does not support %<no-%>");
return false;
}
if (!eq)
{
- error ("custom-fpu-cfg option requires configuration"
- " argument");
+ error ("%<custom-fpu-cfg%> option requires configuration "
+ "argument");
return false;
}
/* Increment and skip whitespace. */
}
else
{
- error ("%<%s%> is unknown", argstr);
+ error ("invalid custom instruction option %qs", argstr);
return false;
}
bool
nios2_cdx_narrow_form_p (rtx_insn *insn)
{
- rtx pat, lhs, rhs1, rhs2;
+ rtx pat, lhs, rhs1 = NULL_RTX, rhs2 = NULL_RTX;
enum attr_type type;
if (!TARGET_HAS_CDX)
return false;