@@ -884,6 +884,28 @@ static M68K_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
884884 // tidy-alphabetical-end
885885] ;
886886
887+ static AVR_FEATURES : & [ ( & str , Stability , ImpliedFeatures ) ] = & [
888+ // tidy-alphabetical-start
889+ ( "addsubiw" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
890+ ( "break" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
891+ ( "eijmpcall" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
892+ ( "elpm" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
893+ ( "elpmx" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
894+ ( "ijmpcall" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
895+ ( "jmpcall" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
896+ ( "lowbytefirst" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
897+ ( "lpm" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
898+ ( "lpmx" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
899+ ( "movw" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
900+ ( "mul" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
901+ ( "rmw" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
902+ ( "spm" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
903+ ( "spmx" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
904+ ( "sram" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
905+ ( "tinyencoding" , Unstable ( sym:: avr_target_feature) , & [ ] ) ,
906+ // tidy-alphabetical-end
907+ ] ;
908+
887909/// When rustdoc is running, provide a list of all known features so that all their respective
888910/// primitives may be documented.
889911///
@@ -905,6 +927,7 @@ pub fn all_rust_features() -> impl Iterator<Item = (&'static str, Stability)> {
905927 . chain ( IBMZ_FEATURES )
906928 . chain ( SPARC_FEATURES )
907929 . chain ( M68K_FEATURES )
930+ . chain ( AVR_FEATURES )
908931 . cloned ( )
909932 . map ( |( f, s, _) | ( f, s) )
910933}
@@ -972,6 +995,7 @@ impl Target {
972995 "s390x" => IBMZ_FEATURES ,
973996 "sparc" | "sparc64" => SPARC_FEATURES ,
974997 "m68k" => M68K_FEATURES ,
998+ "avr" => AVR_FEATURES ,
975999 _ => & [ ] ,
9761000 }
9771001 }
@@ -989,7 +1013,7 @@ impl Target {
9891013 "sparc" | "sparc64" => SPARC_FEATURES_FOR_CORRECT_VECTOR_ABI ,
9901014 "hexagon" => HEXAGON_FEATURES_FOR_CORRECT_VECTOR_ABI ,
9911015 "mips" | "mips32r6" | "mips64" | "mips64r6" => MIPS_FEATURES_FOR_CORRECT_VECTOR_ABI ,
992- "nvptx64" | "bpf" | "m68k" => & [ ] , // no vector ABI
1016+ "nvptx64" | "bpf" | "m68k" | "avr" => & [ ] , // no vector ABI
9931017 "csky" => CSKY_FEATURES_FOR_CORRECT_VECTOR_ABI ,
9941018 // FIXME: for some tier3 targets, we are overly cautious and always give warnings
9951019 // when passing args in vector registers.
0 commit comments