Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 400f122

Browse files
committed
Sync from rust 2f004d2
2 parents 78b6571 + e59b024 commit 400f122

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/inline_asm.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::fmt::Write;
66

77
use rustc_ast::ast::{InlineAsmOptions, InlineAsmTemplatePiece};
88
use rustc_middle::mir::InlineAsmOperand;
9-
use rustc_span::Symbol;
9+
use rustc_span::sym;
1010
use rustc_target::asm::*;
1111

1212
pub(crate) fn codegen_inline_asm<'tcx>(
@@ -182,11 +182,7 @@ struct InlineAssemblyGenerator<'a, 'tcx> {
182182
impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
183183
fn allocate_registers(&mut self) {
184184
let sess = self.tcx.sess;
185-
let map = allocatable_registers(
186-
self.arch,
187-
|feature| sess.target_features.contains(&Symbol::intern(feature)),
188-
&sess.target,
189-
);
185+
let map = allocatable_registers(self.arch, &sess.target_features, &sess.target);
190186
let mut allocated = FxHashMap::<_, (bool, bool)>::default();
191187
let mut regs = vec![None; self.operands.len()];
192188

@@ -319,9 +315,9 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
319315
// Allocate stack slots for saving clobbered registers
320316
let abi_clobber = InlineAsmClobberAbi::parse(
321317
self.arch,
322-
|feature| self.tcx.sess.target_features.contains(&Symbol::intern(feature)),
318+
&self.tcx.sess.target_features,
323319
&self.tcx.sess.target,
324-
Symbol::intern("C"),
320+
sym::C,
325321
)
326322
.unwrap()
327323
.clobbered_regs();

0 commit comments

Comments
 (0)