@@ -482,6 +482,39 @@ const MIPS_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
482
482
// tidy-alphabetical-end
483
483
] ;
484
484
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_90a" ] ) ,
510
+ ( "sm_100a" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_100" ] ) ,
511
+ ( "sm_101" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_100a" ] ) ,
512
+ ( "sm_101a" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_101" ] ) ,
513
+ ( "sm_120" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_101a" ] ) ,
514
+ ( "sm_120a" , Unstable ( sym:: nvptx_target_feature) , & [ "sm_120" ] ) ,
515
+ // tidy-alphabetical-end
516
+ ] ;
517
+
485
518
static RISCV_FEATURES : & [ ( & str , Stability , ImpliedFeatures ) ] = & [
486
519
// tidy-alphabetical-start
487
520
( "a" , Stable , & [ "zaamo" , "zalrsc" ] ) ,
@@ -679,6 +712,7 @@ pub fn all_rust_features() -> impl Iterator<Item = (&'static str, Stability)> {
679
712
. chain ( HEXAGON_FEATURES . iter ( ) )
680
713
. chain ( POWERPC_FEATURES . iter ( ) )
681
714
. chain ( MIPS_FEATURES . iter ( ) )
715
+ . chain ( NVPTX_FEATURES . iter ( ) )
682
716
. chain ( RISCV_FEATURES . iter ( ) )
683
717
. chain ( WASM_FEATURES . iter ( ) )
684
718
. chain ( BPF_FEATURES . iter ( ) )
@@ -732,6 +766,7 @@ impl Target {
732
766
"x86" | "x86_64" => X86_FEATURES ,
733
767
"hexagon" => HEXAGON_FEATURES ,
734
768
"mips" | "mips32r6" | "mips64" | "mips64r6" => MIPS_FEATURES ,
769
+ "nvptx32" | "nvptx64" => NVPTX_FEATURES ,
735
770
"powerpc" | "powerpc64" => POWERPC_FEATURES ,
736
771
"riscv32" | "riscv64" => RISCV_FEATURES ,
737
772
"wasm32" | "wasm64" => WASM_FEATURES ,
@@ -758,6 +793,7 @@ impl Target {
758
793
"sparc" | "sparc64" => SPARC_FEATURES_FOR_CORRECT_VECTOR_ABI ,
759
794
"hexagon" => HEXAGON_FEATURES_FOR_CORRECT_VECTOR_ABI ,
760
795
"mips" | "mips32r6" | "mips64" | "mips64r6" => MIPS_FEATURES_FOR_CORRECT_VECTOR_ABI ,
796
+ "nvptx" => & [ ] , // no vector ABI
761
797
"bpf" | "m68k" => & [ ] , // no vector ABI
762
798
"csky" => CSKY_FEATURES_FOR_CORRECT_VECTOR_ABI ,
763
799
// FIXME: for some tier3 targets, we are overly cautious and always give warnings
0 commit comments