riscv: allow querying 'd' and 'f' target features - #161385
Conversation
|
r? @mejrs rustbot has assigned @mejrs. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
I think it would be worth including the |
|
EDIT: Never mind, just remembered ILP32E. |
|
Ah, right. I should probably cherry-pick the original commit and then remove the "e" part. |
…eUnstable" This reverts commit 55c133a.
|
@workingjubilee pointed out that we already have some fully stable target features that can't be toggled:
So... should we just fully stabilize "d" and "f", i.e. also for use in
Cc @Amanieu @ZhongyaoChen @CaiWeiran @kito-cheng @michaelmaitland @robin-randhawa-sifive @topperc @sanchuanhehe @almindor @rmsyn |
|
Making "d" and "f" fully stable feels like a big "shrug?" to me. I can't think of an enormously strong motivation or, er, demotivation, given that we have to apply restrictions anyways. But unlike with "e", where I'm uncertain about the entire idea of the feature per se, it seems acceptable if unexciting to allow it to join the peculiar ranks of "sse2" and "neon". Though I also didn't remember that ilp32e works with F and not just that specialist set of target features for, I think, floating point in integer registers, that are mutually-exclusive with F. I guess either way is plausible, at least. |
#156188 has been reverted in #161064 due to concerns about "e" being a negative target feature.
"d" and "f" however are almost normal target features, so let's re-land them.
The one thing that's odd about them is that we cannot allow you to use
-Ctarget-featureor#[target_feature]for them on some riscv ABIs. (For now, it remains unstable on all riscv ABIs.) So this means we need the concept of target-features that are fixed by the target spec and cannot be changed by the user. OTOH we kind of already have that, even for fully stable target features:"neon" and "sse2" are even stable target features. With this PR, "d" and "f" remain unstable to toggle; if we ever stabilize them then the rules would be
@rust-lang/lang you already FPC'd this in #156188; please let me know if you want another FCP or if we can just re-land this. Also see below for a proposal to just fully stabilize these target features.
Cc @romancardenas