On ARM, use relocation_model to detect whether r9 should be reserved
The previous approach of checking for the reserve-r9 target feature didn't actually work because LLVM only sets this feature very late when initializing the per-function subtarget.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use super::{InlineAsmArch, InlineAsmType};
|
||||
use crate::spec::Target;
|
||||
use crate::spec::{Target, RelocModel};
|
||||
use rustc_data_structures::stable_set::FxHashSet;
|
||||
use rustc_macros::HashStable_Generic;
|
||||
use rustc_span::{sym, Symbol};
|
||||
@@ -54,6 +54,7 @@ impl RiscVInlineAsmRegClass {
|
||||
|
||||
fn not_e(
|
||||
_arch: InlineAsmArch,
|
||||
_reloc_model: RelocModel,
|
||||
target_features: &FxHashSet<Symbol>,
|
||||
_target: &Target,
|
||||
_is_clobber: bool,
|
||||
|
||||
Reference in New Issue
Block a user