@@ -482,6 +482,70 @@ const MIPS_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
482482 // tidy-alphabetical-end
483483] ;
484484
485+ const NVPTX_FEATURES : & [ ( & str , Stability , ImpliedFeatures ) ] = & [
486+ // tidy-alphabetical-start
487+ ( "sm_20" , Unstable ( sym:: nvptx_target_feature) , & [ ] ) ,
488+ ( "sm_21" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_20" ] ) ,
489+ ( "sm_30" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_21" ] ) ,
490+ ( "sm_32" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_30" ] ) ,
491+ ( "sm_35" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_32" ] ) ,
492+ ( "sm_37" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_35" ] ) ,
493+ ( "sm_50" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_37" ] ) ,
494+ ( "sm_52" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_50" ] ) ,
495+ ( "sm_53" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_52" ] ) ,
496+ ( "sm_60" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_53" ] ) ,
497+ ( "sm_61" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_60" ] ) ,
498+ ( "sm_62" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_61" ] ) ,
499+ ( "sm_70" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_62" ] ) ,
500+ ( "sm_72" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_70" ] ) ,
501+ ( "sm_75" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_72" ] ) ,
502+ ( "sm_80" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_75" ] ) ,
503+ ( "sm_86" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_80" ] ) ,
504+ ( "sm_87" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_86" ] ) ,
505+ ( "sm_90" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_87" ] ) ,
506+ ( "sm_90a" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_90" ] ) ,
507+ // tidy-alphabetical-end
508+ // tidy-alphabetical-start
509+ ( "sm_100" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_90" ] ) ,
510+ ( "sm_100a" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_100" ] ) ,
511+ ( "sm_101" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_100" ] ) ,
512+ ( "sm_101a" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_101" ] ) ,
513+ ( "sm_120" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_101" ] ) ,
514+ ( "sm_120a" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_120" ] ) ,
515+ // tidy-alphabetical-end
516+ // tidy-alphabetical-start
517+ ( "ptx32" , Unstable ( sym:: nvptx_target_feature) , & [ ] ) ,
518+ ( "ptx40" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx32" ] ) ,
519+ ( "ptx41" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx40" ] ) ,
520+ ( "ptx42" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx41" ] ) ,
521+ ( "ptx43" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx42" ] ) ,
522+ ( "ptx50" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx43" ] ) ,
523+ ( "ptx60" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx50" ] ) ,
524+ ( "ptx61" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx60" ] ) ,
525+ ( "ptx62" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx61" ] ) ,
526+ ( "ptx63" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx62" ] ) ,
527+ ( "ptx64" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx63" ] ) ,
528+ ( "ptx65" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx64" ] ) ,
529+ ( "ptx70" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx65" ] ) ,
530+ ( "ptx71" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx70" ] ) ,
531+ ( "ptx72" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx71" ] ) ,
532+ ( "ptx73" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx72" ] ) ,
533+ ( "ptx74" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx73" ] ) ,
534+ ( "ptx75" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx74" ] ) ,
535+ ( "ptx76" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx75" ] ) ,
536+ ( "ptx77" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx76" ] ) ,
537+ ( "ptx78" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx77" ] ) ,
538+ ( "ptx80" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx78" ] ) ,
539+ ( "ptx81" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx80" ] ) ,
540+ ( "ptx82" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx81" ] ) ,
541+ ( "ptx83" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx82" ] ) ,
542+ ( "ptx84" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx83" ] ) ,
543+ ( "ptx85" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx84" ] ) ,
544+ ( "ptx86" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx85" ] ) ,
545+ ( "ptx87" , Unstable ( sym:: nvptx_target_feature) , & [ "ptx86" ] ) ,
546+ // tidy-alphabetical-end
547+ ] ;
548+
485549static RISCV_FEATURES : & [ ( & str , Stability , ImpliedFeatures ) ] = & [
486550 // tidy-alphabetical-start
487551 ( "a" , Stable , & [ "zaamo" , "zalrsc" ] ) ,
@@ -679,6 +743,7 @@ pub fn all_rust_features() -> impl Iterator<Item = (&'static str, Stability)> {
679743 . chain ( HEXAGON_FEATURES . iter ( ) )
680744 . chain ( POWERPC_FEATURES . iter ( ) )
681745 . chain ( MIPS_FEATURES . iter ( ) )
746+ . chain ( NVPTX_FEATURES . iter ( ) )
682747 . chain ( RISCV_FEATURES . iter ( ) )
683748 . chain ( WASM_FEATURES . iter ( ) )
684749 . chain ( BPF_FEATURES . iter ( ) )
@@ -732,6 +797,7 @@ impl Target {
732797 "x86" | "x86_64" => X86_FEATURES ,
733798 "hexagon" => HEXAGON_FEATURES ,
734799 "mips" | "mips32r6" | "mips64" | "mips64r6" => MIPS_FEATURES ,
800+ "nvptx32" | "nvptx64" => NVPTX_FEATURES ,
735801 "powerpc" | "powerpc64" => POWERPC_FEATURES ,
736802 "riscv32" | "riscv64" => RISCV_FEATURES ,
737803 "wasm32" | "wasm64" => WASM_FEATURES ,
@@ -758,6 +824,7 @@ impl Target {
758824 "sparc" | "sparc64" => SPARC_FEATURES_FOR_CORRECT_VECTOR_ABI ,
759825 "hexagon" => HEXAGON_FEATURES_FOR_CORRECT_VECTOR_ABI ,
760826 "mips" | "mips32r6" | "mips64" | "mips64r6" => MIPS_FEATURES_FOR_CORRECT_VECTOR_ABI ,
827+ "nvptx" => & [ ] , // no vector ABI
761828 "bpf" | "m68k" => & [ ] , // no vector ABI
762829 "csky" => CSKY_FEATURES_FOR_CORRECT_VECTOR_ABI ,
763830 // FIXME: for some tier3 targets, we are overly cautious and always give warnings
0 commit comments