@@ -39,7 +39,7 @@ pub enum Stability<Toggleability> {
39
39
allow_toggle : Toggleability ,
40
40
} ,
41
41
/// This feature can not be set via `-Ctarget-feature` or `#[target_feature]`, it can only be
42
- /// set in the basic target definition . It is never set in `cfg(target_feature)`. Used in
42
+ /// set in the target spec . It is never set in `cfg(target_feature)`. Used in
43
43
/// particular for features that change the floating-point ABI.
44
44
Forbidden { reason : & ' static str } ,
45
45
}
@@ -600,7 +600,8 @@ const RISCV_FEATURES: &[(&str, StabilityUncomputed, ImpliedFeatures)] = &[
600
600
Err ( "feature is required by ABI" )
601
601
}
602
602
"ilp32e" if enable => {
603
- // The `d` feature apparently is incompatible with this ABI.
603
+ // ilp32e is incompatible with features that need aligned load/stores > 32 bits,
604
+ // like `d`.
604
605
Err ( "feature is incompatible with ABI" )
605
606
}
606
607
_ => Ok ( ( ) ) ,
@@ -618,7 +619,10 @@ const RISCV_FEATURES: &[(&str, StabilityUncomputed, ImpliedFeatures)] = &[
618
619
allow_toggle : |target, enable| {
619
620
match & * target. llvm_abiname {
620
621
_ if !enable => {
621
- // This is a negative feature, *disabling* it is always okay.
622
+ // Disabling this feature means we can use more registers (x16-x31).
623
+ // The "e" ABIs treat them as caller-save, so it is safe to use them only
624
+ // in some parts of a program while the rest doesn't know they even exist.
625
+ // On other ABIs, the feature is already disabled anyway.
622
626
Ok ( ( ) )
623
627
}
624
628
"ilp32e" | "lp64e" => {
0 commit comments