@@ -668,6 +668,20 @@ const SPARC_FEATURES: &[(&str, StabilityUncomputed, ImpliedFeatures)] = &[
668668 // tidy-alphabetical-end
669669] ;
670670
671+ const M68K_FEATURES : & [ ( & str , StabilityUncomputed , ImpliedFeatures ) ] = & [
672+ // tidy-alphabetical-start
673+ ( "isa-68000" , unstable ( sym:: m68k_target_feature) , & [ ] ) ,
674+ ( "isa-68010" , unstable ( sym:: m68k_target_feature) , & [ "isa-68000" ] ) ,
675+ ( "isa-68020" , unstable ( sym:: m68k_target_feature) , & [ "isa-68010" ] ) ,
676+ ( "isa-68030" , unstable ( sym:: m68k_target_feature) , & [ "isa-68020" ] ) ,
677+ ( "isa-68040" , unstable ( sym:: m68k_target_feature) , & [ "isa-68030" , "isa-68882" ] ) ,
678+ ( "isa-68060" , unstable ( sym:: m68k_target_feature) , & [ "isa-68040" ] ) ,
679+ // FPU
680+ ( "isa-68881" , unstable ( sym:: m68k_target_feature) , & [ ] ) ,
681+ ( "isa-68882" , unstable ( sym:: m68k_target_feature) , & [ "isa-68881" ] ) ,
682+ // tidy-alphabetical-end
683+ ] ;
684+
671685/// When rustdoc is running, provide a list of all known features so that all their respective
672686/// primitives may be documented.
673687///
@@ -687,6 +701,7 @@ pub fn all_rust_features() -> impl Iterator<Item = (&'static str, StabilityUncom
687701 . chain ( LOONGARCH_FEATURES )
688702 . chain ( IBMZ_FEATURES )
689703 . chain ( SPARC_FEATURES )
704+ . chain ( M68K_FEATURES )
690705 . cloned ( )
691706 . map ( |( f, s, _) | ( f, s) )
692707}
@@ -734,6 +749,7 @@ impl Target {
734749 "loongarch64" => LOONGARCH_FEATURES ,
735750 "s390x" => IBMZ_FEATURES ,
736751 "sparc" | "sparc64" => SPARC_FEATURES ,
752+ "m68k" => M68K_FEATURES ,
737753 _ => & [ ] ,
738754 }
739755 }
@@ -751,7 +767,7 @@ impl Target {
751767 "sparc" | "sparc64" => SPARC_FEATURES_FOR_CORRECT_VECTOR_ABI ,
752768 "hexagon" => HEXAGON_FEATURES_FOR_CORRECT_VECTOR_ABI ,
753769 "mips" | "mips32r6" | "mips64" | "mips64r6" => MIPS_FEATURES_FOR_CORRECT_VECTOR_ABI ,
754- "bpf" => & [ ] , // no vector ABI
770+ "bpf" | "m68k" => & [ ] , // no vector ABI
755771 "csky" => CSKY_FEATURES_FOR_CORRECT_VECTOR_ABI ,
756772 // FIXME: for some tier3 targets, we are overly cautious and always give warnings
757773 // when passing args in vector registers.
0 commit comments