Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions compiler/rustc_codegen_gcc/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,11 @@ fn reg_class_to_gcc(reg_class: InlineAsmRegClass) -> &'static str {
| X86InlineAsmRegClass::mmx_reg
| X86InlineAsmRegClass::tmm_reg,
) => unreachable!("clobber-only"),
InlineAsmRegClass::Xtensa(XtensaInlineAsmRegClass::reg) => "r",
InlineAsmRegClass::Xtensa(XtensaInlineAsmRegClass::freg) => "f",
InlineAsmRegClass::Xtensa(
XtensaInlineAsmRegClass::sreg | XtensaInlineAsmRegClass::breg,
) => unreachable!("clobber-only"),
InlineAsmRegClass::SpirV(SpirVInlineAsmRegClass::reg) => {
bug!("GCC backend does not support SPIR-V")
}
Expand Down Expand Up @@ -849,6 +854,11 @@ fn dummy_output_type<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, reg: InlineAsmRegCl
InlineAsmRegClass::SpirV(SpirVInlineAsmRegClass::reg) => {
bug!("GCC backend does not support SPIR-V")
}
InlineAsmRegClass::Xtensa(XtensaInlineAsmRegClass::reg) => cx.type_i32(),
InlineAsmRegClass::Xtensa(XtensaInlineAsmRegClass::freg) => cx.type_f32(),
InlineAsmRegClass::Xtensa(
XtensaInlineAsmRegClass::sreg | XtensaInlineAsmRegClass::breg,
) => unreachable!("clobber-only"),
InlineAsmRegClass::Err => unreachable!(),
}
}
Expand Down Expand Up @@ -1040,6 +1050,7 @@ fn modifier_to_gcc(
InlineAsmRegClass::SpirV(SpirVInlineAsmRegClass::reg) => {
bug!("LLVM backend does not support SPIR-V")
}
InlineAsmRegClass::Xtensa(_) => None,
InlineAsmRegClass::Err => unreachable!(),
}
}
12 changes: 12 additions & 0 deletions compiler/rustc_codegen_llvm/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
}
InlineAsmArch::SpirV => {}
InlineAsmArch::Wasm32 | InlineAsmArch::Wasm64 => {}
InlineAsmArch::Xtensa => {}
InlineAsmArch::Bpf => {}
InlineAsmArch::Msp430 => {
constraints.push("~{sr}".to_string());
Expand Down Expand Up @@ -683,6 +684,11 @@ fn reg_to_llvm(reg: InlineAsmRegOrRegClass, layout: Option<&TyAndLayout<'_>>) ->
| X86InlineAsmRegClass::kreg0
| X86InlineAsmRegClass::tmm_reg,
) => unreachable!("clobber-only"),
Xtensa(XtensaInlineAsmRegClass::freg) => "f",
Xtensa(XtensaInlineAsmRegClass::reg) => "r",
Xtensa(XtensaInlineAsmRegClass::sreg | XtensaInlineAsmRegClass::breg) => {
unreachable!("clobber-only")
}
Wasm(WasmInlineAsmRegClass::local) => "r",
Bpf(BpfInlineAsmRegClass::reg) => "r",
Bpf(BpfInlineAsmRegClass::wreg) => "w",
Expand Down Expand Up @@ -788,6 +794,7 @@ fn modifier_to_llvm(
| X86InlineAsmRegClass::kreg0
| X86InlineAsmRegClass::tmm_reg,
) => unreachable!("clobber-only"),
Xtensa(_) => None,
Wasm(WasmInlineAsmRegClass::local) => None,
Bpf(_) => None,
Avr(AvrInlineAsmRegClass::reg_pair)
Expand Down Expand Up @@ -864,6 +871,11 @@ fn dummy_output_type<'ll>(cx: &CodegenCx<'ll, '_>, reg: InlineAsmRegClass) -> &'
| X86InlineAsmRegClass::kreg0
| X86InlineAsmRegClass::tmm_reg,
) => unreachable!("clobber-only"),
Xtensa(XtensaInlineAsmRegClass::reg) => cx.type_i32(),
Xtensa(XtensaInlineAsmRegClass::freg) => cx.type_f32(),
Xtensa(XtensaInlineAsmRegClass::sreg | XtensaInlineAsmRegClass::breg) => {
unreachable!("clobber-only")
}
Wasm(WasmInlineAsmRegClass::local) => cx.type_i32(),
Bpf(BpfInlineAsmRegClass::reg) => cx.type_i64(),
Bpf(BpfInlineAsmRegClass::wreg) => cx.type_i32(),
Expand Down
30 changes: 30 additions & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,8 @@ symbols! {
async_iterator,
async_iterator_poll_next,
async_trait_bounds,
atomctl,
atomic,
atomic_and,
atomic_cxchg,
atomic_cxchgweak,
Expand Down Expand Up @@ -537,6 +539,7 @@ symbols! {
braced_empty_structs,
branch,
breakpoint,
breg,
bridge,
bswap,
built,
Expand Down Expand Up @@ -697,6 +700,8 @@ symbols! {
contracts_internals,
contracts_requires,
convert,
convert_identity,
coprocessor,
copy,
copy_closures,
copy_nonoverlapping,
Expand Down Expand Up @@ -868,6 +873,7 @@ symbols! {
ermsb_target_feature,
exact_div,
except,
exception,
exception_handling: "exception-handling",
exclusive_range_pattern,
exhaustive_integer_patterns,
Expand All @@ -894,6 +900,7 @@ symbols! {
expr_fragment_specifier_2024,
extended_key_value_attributes,
extended_varargs_abi_support,
extendedl32r,
extern_absolute_paths,
extern_crate_item_prelude,
extern_crate_self,
Expand Down Expand Up @@ -978,6 +985,9 @@ symbols! {
format_argument,
format_arguments,
format_macro,
format_placeholder,
format_unsafe_arg,
fp,
framework,
freeze,
freeze_impls,
Expand Down Expand Up @@ -1035,6 +1045,8 @@ symbols! {
hexagon_target_feature,
hidden,
hide,
highpriinterrupts,
hint,
homogeneous_aggregate,
html_favicon_url,
html_logo_url,
Expand Down Expand Up @@ -1090,6 +1102,7 @@ symbols! {
internal,
internal_eq_trait_method_impls,
internal_features,
interrupt,
into_async_iter_into_iter,
into_future,
into_iter,
Expand Down Expand Up @@ -1182,6 +1195,7 @@ symbols! {
lt,
m68k,
m68k_target_feature,
mac16,
macro_at_most_once_rep,
macro_attr,
macro_attributes_in_derive_output,
Expand Down Expand Up @@ -1229,6 +1243,7 @@ symbols! {
mem_variant_count,
mem_zeroed,
member_constraints,
memctl,
memory,
memtag,
message,
Expand Down Expand Up @@ -1290,6 +1305,8 @@ symbols! {
mir_unwind_unreachable,
mir_variant,
miri,
misc,
miscsr,
mmx_reg,
modifiers,
module,
Expand Down Expand Up @@ -1531,6 +1548,10 @@ symbols! {
prelude_import,
preserves_flags,
prfchw_target_feature,
prid,
primitive,
print_macro,
println_macro,
proc_dash_macro: "proc-macro",
proc_macro,
proc_macro_attribute,
Expand Down Expand Up @@ -1786,7 +1807,9 @@ symbols! {
rustdoc_missing_doc_code_examples,
rustfmt,
rvalue_static_promotion,
rvector,
rwpi,
s32c1i,
s390x,
s390x_target_feature,
s390x_target_feature_vector,
Expand Down Expand Up @@ -2007,9 +2030,13 @@ symbols! {
test_unstable_lint,
thread,
thread_local,
thread_local_macro,
threadptr,
three_way_compare,
thumb2,
thumb_mode: "thumb-mode",
time,
timerint,
tmm_reg,
to_string,
to_vec,
Expand Down Expand Up @@ -2222,6 +2249,7 @@ symbols! {
while_let,
whole_dash_archive: "whole-archive",
width,
windowed,
windows,
windows_subsystem,
with_negative_coherence,
Expand All @@ -2246,9 +2274,11 @@ symbols! {
x87_reg,
x87_target_feature,
xer,
xloop,
xmm_reg,
xop_target_feature,
xtensa,
xtensa_target_feature,
yeet_desugar_details,
yeet_expr,
yes,
Expand Down
Loading
Loading