Migrate ast_lowering::ast to SessionDiagnostic
This commit is contained in:
parent
1382d307d3
commit
d75fd91d50
3 changed files with 239 additions and 100 deletions
|
@ -1,11 +1,17 @@
|
||||||
use crate::{ImplTraitContext, ImplTraitPosition, ParamMode, ResolverAstLoweringExt};
|
use crate::{ImplTraitContext, ImplTraitPosition, ParamMode, ResolverAstLoweringExt};
|
||||||
|
|
||||||
|
use super::errors::{
|
||||||
|
AbiSpecifiedMultipleTimes, AttSyntaxOnlyX86, ClobberAbiNotSupported,
|
||||||
|
InlineAsmUnsupportedTarget, InvalidAbiClobberAbi, InvalidAsmTemplateModifierConst,
|
||||||
|
InvalidAsmTemplateModifierRegClass, InvalidAsmTemplateModifierRegClassSub,
|
||||||
|
InvalidAsmTemplateModifierSym, InvalidRegister, InvalidRegisterClass, RegisterClassOnlyClobber,
|
||||||
|
RegisterConflict,
|
||||||
|
};
|
||||||
use super::LoweringContext;
|
use super::LoweringContext;
|
||||||
|
|
||||||
use rustc_ast::ptr::P;
|
use rustc_ast::ptr::P;
|
||||||
use rustc_ast::*;
|
use rustc_ast::*;
|
||||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||||
use rustc_errors::struct_span_err;
|
|
||||||
use rustc_hir as hir;
|
use rustc_hir as hir;
|
||||||
use rustc_hir::def::{DefKind, Res};
|
use rustc_hir::def::{DefKind, Res};
|
||||||
use rustc_hir::definitions::DefPathData;
|
use rustc_hir::definitions::DefPathData;
|
||||||
|
@ -26,13 +32,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
let asm_arch =
|
let asm_arch =
|
||||||
if self.tcx.sess.opts.actually_rustdoc { None } else { self.tcx.sess.asm_arch };
|
if self.tcx.sess.opts.actually_rustdoc { None } else { self.tcx.sess.asm_arch };
|
||||||
if asm_arch.is_none() && !self.tcx.sess.opts.actually_rustdoc {
|
if asm_arch.is_none() && !self.tcx.sess.opts.actually_rustdoc {
|
||||||
struct_span_err!(
|
self.tcx.sess.emit_err(InlineAsmUnsupportedTarget { span: sp });
|
||||||
self.tcx.sess,
|
|
||||||
sp,
|
|
||||||
E0472,
|
|
||||||
"inline assembly is unsupported on this target"
|
|
||||||
)
|
|
||||||
.emit();
|
|
||||||
}
|
}
|
||||||
if let Some(asm_arch) = asm_arch {
|
if let Some(asm_arch) = asm_arch {
|
||||||
// Inline assembly is currently only stable for these architectures.
|
// Inline assembly is currently only stable for these architectures.
|
||||||
|
@ -59,10 +59,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
&& !matches!(asm_arch, Some(asm::InlineAsmArch::X86 | asm::InlineAsmArch::X86_64))
|
&& !matches!(asm_arch, Some(asm::InlineAsmArch::X86 | asm::InlineAsmArch::X86_64))
|
||||||
&& !self.tcx.sess.opts.actually_rustdoc
|
&& !self.tcx.sess.opts.actually_rustdoc
|
||||||
{
|
{
|
||||||
self.tcx
|
self.tcx.sess.emit_err(AttSyntaxOnlyX86 { span: sp });
|
||||||
.sess
|
|
||||||
.struct_span_err(sp, "the `att_syntax` option is only supported on x86")
|
|
||||||
.emit();
|
|
||||||
}
|
}
|
||||||
if asm.options.contains(InlineAsmOptions::MAY_UNWIND) && !self.tcx.features().asm_unwind {
|
if asm.options.contains(InlineAsmOptions::MAY_UNWIND) && !self.tcx.features().asm_unwind {
|
||||||
feature_err(
|
feature_err(
|
||||||
|
@ -82,51 +79,37 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
// If the abi was already in the list, emit an error
|
// If the abi was already in the list, emit an error
|
||||||
match clobber_abis.get(&abi) {
|
match clobber_abis.get(&abi) {
|
||||||
Some((prev_name, prev_sp)) => {
|
Some((prev_name, prev_sp)) => {
|
||||||
let mut err = self.tcx.sess.struct_span_err(
|
|
||||||
*abi_span,
|
|
||||||
&format!("`{}` ABI specified multiple times", prev_name),
|
|
||||||
);
|
|
||||||
err.span_label(*prev_sp, "previously specified here");
|
|
||||||
|
|
||||||
// Multiple different abi names may actually be the same ABI
|
// Multiple different abi names may actually be the same ABI
|
||||||
// If the specified ABIs are not the same name, alert the user that they resolve to the same ABI
|
// If the specified ABIs are not the same name, alert the user that they resolve to the same ABI
|
||||||
let source_map = self.tcx.sess.source_map();
|
let source_map = self.tcx.sess.source_map();
|
||||||
if source_map.span_to_snippet(*prev_sp)
|
let equivalent = (source_map.span_to_snippet(*prev_sp)
|
||||||
!= source_map.span_to_snippet(*abi_span)
|
!= source_map.span_to_snippet(*abi_span))
|
||||||
{
|
.then_some(());
|
||||||
err.note("these ABIs are equivalent on the current target");
|
|
||||||
}
|
|
||||||
|
|
||||||
err.emit();
|
self.tcx.sess.emit_err(AbiSpecifiedMultipleTimes {
|
||||||
|
abi_span: *abi_span,
|
||||||
|
prev_name: *prev_name,
|
||||||
|
prev_span: *prev_sp,
|
||||||
|
equivalent,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
clobber_abis.insert(abi, (abi_name, *abi_span));
|
clobber_abis.insert(abi, (*abi_name, *abi_span));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(&[]) => {
|
Err(&[]) => {
|
||||||
self.tcx
|
self.tcx.sess.emit_err(ClobberAbiNotSupported { abi_span: *abi_span });
|
||||||
.sess
|
|
||||||
.struct_span_err(
|
|
||||||
*abi_span,
|
|
||||||
"`clobber_abi` is not supported on this target",
|
|
||||||
)
|
|
||||||
.emit();
|
|
||||||
}
|
}
|
||||||
Err(supported_abis) => {
|
Err(supported_abis) => {
|
||||||
let mut err = self
|
|
||||||
.tcx
|
|
||||||
.sess
|
|
||||||
.struct_span_err(*abi_span, "invalid ABI for `clobber_abi`");
|
|
||||||
let mut abis = format!("`{}`", supported_abis[0]);
|
let mut abis = format!("`{}`", supported_abis[0]);
|
||||||
for m in &supported_abis[1..] {
|
for m in &supported_abis[1..] {
|
||||||
let _ = write!(abis, ", `{}`", m);
|
let _ = write!(abis, ", `{}`", m);
|
||||||
}
|
}
|
||||||
err.note(&format!(
|
self.tcx.sess.emit_err(InvalidAbiClobberAbi {
|
||||||
"the following ABIs are supported on this target: {}",
|
abi_span: *abi_span,
|
||||||
abis
|
supported_abis: abis,
|
||||||
));
|
});
|
||||||
err.emit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,8 +127,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
InlineAsmRegOrRegClass::Reg(s) => {
|
InlineAsmRegOrRegClass::Reg(s) => {
|
||||||
asm::InlineAsmRegOrRegClass::Reg(if let Some(asm_arch) = asm_arch {
|
asm::InlineAsmRegOrRegClass::Reg(if let Some(asm_arch) = asm_arch {
|
||||||
asm::InlineAsmReg::parse(asm_arch, s).unwrap_or_else(|e| {
|
asm::InlineAsmReg::parse(asm_arch, s).unwrap_or_else(|e| {
|
||||||
let msg = format!("invalid register `{}`: {}", s, e);
|
sess.emit_err(InvalidRegister { op_span: *op_sp, s, e });
|
||||||
sess.struct_span_err(*op_sp, &msg).emit();
|
|
||||||
asm::InlineAsmReg::Err
|
asm::InlineAsmReg::Err
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -155,8 +137,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
InlineAsmRegOrRegClass::RegClass(s) => {
|
InlineAsmRegOrRegClass::RegClass(s) => {
|
||||||
asm::InlineAsmRegOrRegClass::RegClass(if let Some(asm_arch) = asm_arch {
|
asm::InlineAsmRegOrRegClass::RegClass(if let Some(asm_arch) = asm_arch {
|
||||||
asm::InlineAsmRegClass::parse(asm_arch, s).unwrap_or_else(|e| {
|
asm::InlineAsmRegClass::parse(asm_arch, s).unwrap_or_else(|e| {
|
||||||
let msg = format!("invalid register class `{}`: {}", s, e);
|
sess.emit_err(InvalidRegisterClass { op_span: *op_sp, s, e });
|
||||||
sess.struct_span_err(*op_sp, &msg).emit();
|
|
||||||
asm::InlineAsmRegClass::Err
|
asm::InlineAsmRegClass::Err
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -282,50 +263,39 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
}
|
}
|
||||||
let valid_modifiers = class.valid_modifiers(asm_arch.unwrap());
|
let valid_modifiers = class.valid_modifiers(asm_arch.unwrap());
|
||||||
if !valid_modifiers.contains(&modifier) {
|
if !valid_modifiers.contains(&modifier) {
|
||||||
let mut err = sess.struct_span_err(
|
let sub = if !valid_modifiers.is_empty() {
|
||||||
placeholder_span,
|
|
||||||
"invalid asm template modifier for this register class",
|
|
||||||
);
|
|
||||||
err.span_label(placeholder_span, "template modifier");
|
|
||||||
err.span_label(op_sp, "argument");
|
|
||||||
if !valid_modifiers.is_empty() {
|
|
||||||
let mut mods = format!("`{}`", valid_modifiers[0]);
|
let mut mods = format!("`{}`", valid_modifiers[0]);
|
||||||
for m in &valid_modifiers[1..] {
|
for m in &valid_modifiers[1..] {
|
||||||
let _ = write!(mods, ", `{}`", m);
|
let _ = write!(mods, ", `{}`", m);
|
||||||
}
|
}
|
||||||
err.note(&format!(
|
InvalidAsmTemplateModifierRegClassSub::SupportModifier {
|
||||||
"the `{}` register class supports \
|
class_name: class.name(),
|
||||||
the following template modifiers: {}",
|
modifiers: mods,
|
||||||
class.name(),
|
}
|
||||||
mods
|
|
||||||
));
|
|
||||||
} else {
|
} else {
|
||||||
err.note(&format!(
|
InvalidAsmTemplateModifierRegClassSub::DoesNotSupportModifier {
|
||||||
"the `{}` register class does not support template modifiers",
|
class_name: class.name(),
|
||||||
class.name()
|
}
|
||||||
));
|
};
|
||||||
}
|
sess.emit_err(InvalidAsmTemplateModifierRegClass {
|
||||||
err.emit();
|
placeholder_span,
|
||||||
|
op_span: op_sp,
|
||||||
|
sub,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hir::InlineAsmOperand::Const { .. } => {
|
hir::InlineAsmOperand::Const { .. } => {
|
||||||
let mut err = sess.struct_span_err(
|
sess.emit_err(InvalidAsmTemplateModifierConst {
|
||||||
placeholder_span,
|
placeholder_span,
|
||||||
"asm template modifiers are not allowed for `const` arguments",
|
op_span: op_sp,
|
||||||
);
|
});
|
||||||
err.span_label(placeholder_span, "template modifier");
|
|
||||||
err.span_label(op_sp, "argument");
|
|
||||||
err.emit();
|
|
||||||
}
|
}
|
||||||
hir::InlineAsmOperand::SymFn { .. }
|
hir::InlineAsmOperand::SymFn { .. }
|
||||||
| hir::InlineAsmOperand::SymStatic { .. } => {
|
| hir::InlineAsmOperand::SymStatic { .. } => {
|
||||||
let mut err = sess.struct_span_err(
|
sess.emit_err(InvalidAsmTemplateModifierSym {
|
||||||
placeholder_span,
|
placeholder_span,
|
||||||
"asm template modifiers are not allowed for `sym` arguments",
|
op_span: op_sp,
|
||||||
);
|
});
|
||||||
err.span_label(placeholder_span, "template modifier");
|
|
||||||
err.span_label(op_sp, "argument");
|
|
||||||
err.emit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -346,12 +316,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
// require that the operand name an explicit register, not a
|
// require that the operand name an explicit register, not a
|
||||||
// register class.
|
// register class.
|
||||||
if reg_class.is_clobber_only(asm_arch.unwrap()) && !op.is_clobber() {
|
if reg_class.is_clobber_only(asm_arch.unwrap()) && !op.is_clobber() {
|
||||||
let msg = format!(
|
sess.emit_err(RegisterClassOnlyClobber {
|
||||||
"register class `{}` can only be used as a clobber, \
|
op_span: op_sp,
|
||||||
not as an input or output",
|
reg_class_name: reg_class.name(),
|
||||||
reg_class.name()
|
});
|
||||||
);
|
|
||||||
sess.struct_span_err(op_sp, &msg).emit();
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,16 +359,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
unreachable!();
|
unreachable!();
|
||||||
};
|
};
|
||||||
|
|
||||||
let msg = format!(
|
let in_out = match (op, op2) {
|
||||||
"register `{}` conflicts with register `{}`",
|
|
||||||
reg.name(),
|
|
||||||
reg2.name()
|
|
||||||
);
|
|
||||||
let mut err = sess.struct_span_err(op_sp, &msg);
|
|
||||||
err.span_label(op_sp, &format!("register `{}`", reg.name()));
|
|
||||||
err.span_label(op_sp2, &format!("register `{}`", reg2.name()));
|
|
||||||
|
|
||||||
match (op, op2) {
|
|
||||||
(
|
(
|
||||||
hir::InlineAsmOperand::In { .. },
|
hir::InlineAsmOperand::In { .. },
|
||||||
hir::InlineAsmOperand::Out { late, .. },
|
hir::InlineAsmOperand::Out { late, .. },
|
||||||
|
@ -411,14 +370,18 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
) => {
|
) => {
|
||||||
assert!(!*late);
|
assert!(!*late);
|
||||||
let out_op_sp = if input { op_sp2 } else { op_sp };
|
let out_op_sp = if input { op_sp2 } else { op_sp };
|
||||||
let msg = "use `lateout` instead of \
|
Some(out_op_sp)
|
||||||
`out` to avoid conflict";
|
},
|
||||||
err.span_help(out_op_sp, msg);
|
_ => None,
|
||||||
}
|
};
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
|
|
||||||
err.emit();
|
sess.emit_err(RegisterConflict {
|
||||||
|
op_span1: op_sp,
|
||||||
|
op_span2: op_sp2,
|
||||||
|
reg1_name: reg.name(),
|
||||||
|
reg2_name: reg2.name(),
|
||||||
|
in_out
|
||||||
|
});
|
||||||
}
|
}
|
||||||
Entry::Vacant(v) => {
|
Entry::Vacant(v) => {
|
||||||
if r == reg {
|
if r == reg {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use rustc_errors::{fluent, AddSubdiagnostic, Applicability, Diagnostic};
|
use rustc_errors::{fluent, AddSubdiagnostic, Applicability, Diagnostic};
|
||||||
use rustc_macros::SessionDiagnostic;
|
use rustc_macros::{SessionDiagnostic, SessionSubdiagnostic};
|
||||||
use rustc_span::{Span, Symbol};
|
use rustc_span::{Span, Symbol};
|
||||||
|
|
||||||
#[derive(SessionDiagnostic, Clone, Copy)]
|
#[derive(SessionDiagnostic, Clone, Copy)]
|
||||||
|
@ -148,3 +148,125 @@ pub struct AsyncGeneratorsNotSupported {
|
||||||
#[primary_span]
|
#[primary_span]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic, Clone, Copy)]
|
||||||
|
#[error(ast_lowering::inline_asm_unsupported_target, code = "E0472")]
|
||||||
|
pub struct InlineAsmUnsupportedTarget {
|
||||||
|
#[primary_span]
|
||||||
|
pub span: Span,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic, Clone, Copy)]
|
||||||
|
#[error(ast_lowering::att_syntax_only_x86)]
|
||||||
|
pub struct AttSyntaxOnlyX86 {
|
||||||
|
#[primary_span]
|
||||||
|
pub span: Span,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic, Clone, Copy)]
|
||||||
|
#[error(ast_lowering::abi_specified_multiple_times)]
|
||||||
|
pub struct AbiSpecifiedMultipleTimes {
|
||||||
|
#[primary_span]
|
||||||
|
pub abi_span: Span,
|
||||||
|
pub prev_name: Symbol,
|
||||||
|
#[label]
|
||||||
|
pub prev_span: Span,
|
||||||
|
#[note]
|
||||||
|
pub equivalent: Option<()>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic, Clone, Copy)]
|
||||||
|
#[error(ast_lowering::clobber_abi_not_supported)]
|
||||||
|
pub struct ClobberAbiNotSupported {
|
||||||
|
#[primary_span]
|
||||||
|
pub abi_span: Span,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic)]
|
||||||
|
#[note]
|
||||||
|
#[error(ast_lowering::invalid_abi_clobber_abi)]
|
||||||
|
pub struct InvalidAbiClobberAbi {
|
||||||
|
#[primary_span]
|
||||||
|
pub abi_span: Span,
|
||||||
|
pub supported_abis: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic, Clone, Copy)]
|
||||||
|
#[error(ast_lowering::invalid_register)]
|
||||||
|
pub struct InvalidRegister<'a> {
|
||||||
|
#[primary_span]
|
||||||
|
pub op_span: Span,
|
||||||
|
pub s: Symbol,
|
||||||
|
pub e: &'a str,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic, Clone, Copy)]
|
||||||
|
#[error(ast_lowering::invalid_register_class)]
|
||||||
|
pub struct InvalidRegisterClass<'a> {
|
||||||
|
#[primary_span]
|
||||||
|
pub op_span: Span,
|
||||||
|
pub s: Symbol,
|
||||||
|
pub e: &'a str,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic)]
|
||||||
|
#[error(ast_lowering::invalid_asm_template_modifier_reg_class)]
|
||||||
|
pub struct InvalidAsmTemplateModifierRegClass {
|
||||||
|
#[primary_span]
|
||||||
|
#[label(ast_lowering::template_modifier)]
|
||||||
|
pub placeholder_span: Span,
|
||||||
|
#[label(ast_lowering::argument)]
|
||||||
|
pub op_span: Span,
|
||||||
|
#[subdiagnostic]
|
||||||
|
pub sub: InvalidAsmTemplateModifierRegClassSub,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionSubdiagnostic)]
|
||||||
|
pub enum InvalidAsmTemplateModifierRegClassSub {
|
||||||
|
#[note(ast_lowering::support_modifiers)]
|
||||||
|
SupportModifier { class_name: Symbol, modifiers: String },
|
||||||
|
#[note(ast_lowering::does_not_support_modifiers)]
|
||||||
|
DoesNotSupportModifier { class_name: Symbol },
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic, Clone, Copy)]
|
||||||
|
#[error(ast_lowering::invalid_asm_template_modifier_const)]
|
||||||
|
pub struct InvalidAsmTemplateModifierConst {
|
||||||
|
#[primary_span]
|
||||||
|
#[label(ast_lowering::template_modifier)]
|
||||||
|
pub placeholder_span: Span,
|
||||||
|
#[label(ast_lowering::argument)]
|
||||||
|
pub op_span: Span,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic, Clone, Copy)]
|
||||||
|
#[error(ast_lowering::invalid_asm_template_modifier_sym)]
|
||||||
|
pub struct InvalidAsmTemplateModifierSym {
|
||||||
|
#[primary_span]
|
||||||
|
#[label(ast_lowering::template_modifier)]
|
||||||
|
pub placeholder_span: Span,
|
||||||
|
#[label(ast_lowering::argument)]
|
||||||
|
pub op_span: Span,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic, Clone, Copy)]
|
||||||
|
#[error(ast_lowering::register_class_only_clobber)]
|
||||||
|
pub struct RegisterClassOnlyClobber {
|
||||||
|
#[primary_span]
|
||||||
|
pub op_span: Span,
|
||||||
|
pub reg_class_name: Symbol,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(SessionDiagnostic, Clone, Copy)]
|
||||||
|
#[error(ast_lowering::register_conflict)]
|
||||||
|
pub struct RegisterConflict<'a> {
|
||||||
|
#[primary_span]
|
||||||
|
#[label(ast_lowering::register1)]
|
||||||
|
pub op_span1: Span,
|
||||||
|
#[label(ast_lowering::register2)]
|
||||||
|
pub op_span2: Span,
|
||||||
|
pub reg1_name: &'a str,
|
||||||
|
pub reg2_name: &'a str,
|
||||||
|
#[help]
|
||||||
|
pub in_out: Option<Span>,
|
||||||
|
}
|
||||||
|
|
|
@ -49,3 +49,57 @@ ast_lowering_functional_record_update_destructuring_assignment =
|
||||||
|
|
||||||
ast_lowering_async_generators_not_supported =
|
ast_lowering_async_generators_not_supported =
|
||||||
`async` generators are not yet supported
|
`async` generators are not yet supported
|
||||||
|
|
||||||
|
ast_lowering_inline_asm_unsupported_target =
|
||||||
|
inline assembly is unsupported on this target
|
||||||
|
|
||||||
|
ast_lowering_att_syntax_only_x86 =
|
||||||
|
the `att_syntax` option is only supported on x86
|
||||||
|
|
||||||
|
ast_lowering_abi_specified_multiple_times =
|
||||||
|
`{$prev_name}` ABI specified multiple times
|
||||||
|
.label = previously specified here
|
||||||
|
.note = these ABIs are equivalent on the current target
|
||||||
|
|
||||||
|
ast_lowering_clobber_abi_not_supported =
|
||||||
|
`clobber_abi` is not supported on this target
|
||||||
|
|
||||||
|
ast_lowering_invalid_abi_clobber_abi =
|
||||||
|
invalid ABI for `clobber_abi`
|
||||||
|
.note = the following ABIs are supported on this target: {$supported_abis}
|
||||||
|
|
||||||
|
ast_lowering_invalid_register =
|
||||||
|
invalid register `{$s}`: {$e}
|
||||||
|
|
||||||
|
ast_lowering_invalid_register_class =
|
||||||
|
invalid register class `{$s}`: {$e}
|
||||||
|
|
||||||
|
ast_lowering_invalid_asm_template_modifier_reg_class =
|
||||||
|
invalid asm template modifier for this register class
|
||||||
|
|
||||||
|
ast_lowering_argument = argument
|
||||||
|
|
||||||
|
ast_lowering_template_modifier = template modifier
|
||||||
|
|
||||||
|
ast_lowering_support_modifiers =
|
||||||
|
the `{$class_name}` register class supports the following template modifiers: {$modifiers}
|
||||||
|
|
||||||
|
ast_lowering_does_not_support_modifiers =
|
||||||
|
the `{$class_name}` register class does not support template modifiers
|
||||||
|
|
||||||
|
ast_lowering_invalid_asm_template_modifier_const =
|
||||||
|
asm template modifiers are not allowed for `const` arguments
|
||||||
|
|
||||||
|
ast_lowering_invalid_asm_template_modifier_sym =
|
||||||
|
asm template modifiers are not allowed for `sym` arguments
|
||||||
|
|
||||||
|
ast_lowering_register_class_only_clobber =
|
||||||
|
register class `{$reg_class_name}` can only be used as a clobber, not as an input or output
|
||||||
|
|
||||||
|
ast_lowering_register_conflict =
|
||||||
|
register `{$reg1_name}` conflicts with register `{$reg2_name}`
|
||||||
|
.help = use `lateout` instead of `out` to avoid conflict
|
||||||
|
|
||||||
|
ast_lowering_register1 = register `{$reg1_name}`
|
||||||
|
|
||||||
|
ast_lowering_register2 = register `{$reg2_name}`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue