Skip to content

Commit 812edd2

Browse files
committed
Sync from rust c44b3d5
2 parents 95bb635 + 7174bcc commit 812edd2

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed

src/driver/jit.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ fn create_jit_module(tcx: TyCtxt<'_>, hotswap: bool) -> (UnwindModule<JITModule>
7070
jit_builder.symbol("__clif_jit_fn", clif_jit_fn as *const u8);
7171
let mut jit_module = UnwindModule::new(JITModule::new(jit_builder), false);
7272

73-
let cx = crate::CodegenCx::new(tcx, jit_module.isa(), false, Symbol::intern("dummy_cgu_name"));
73+
let cx = crate::CodegenCx::new(tcx, jit_module.isa(), false, sym::dummy_cgu_name);
7474

7575
crate::allocator::codegen(tcx, &mut jit_module);
7676

@@ -269,12 +269,7 @@ fn jit_fn(instance_ptr: *const Instance<'static>, trampoline_ptr: *const u8) ->
269269

270270
jit_module.module.prepare_for_function_redefine(func_id).unwrap();
271271

272-
let mut cx = crate::CodegenCx::new(
273-
tcx,
274-
jit_module.isa(),
275-
false,
276-
Symbol::intern("dummy_cgu_name"),
277-
);
272+
let mut cx = crate::CodegenCx::new(tcx, jit_module.isa(), false, sym::dummy_cgu_name);
278273
codegen_and_compile_fn(tcx, &mut cx, &mut Context::new(), jit_module, instance);
279274

280275
assert!(cx.global_asm.is_empty());

src/inline_asm.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,14 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
473473
let mut new_slot = |x| new_slot_fn(&mut slot_size, x);
474474

475475
// Allocate stack slots for saving clobbered registers
476-
let abi_clobber = InlineAsmClobberAbi::parse(self.arch, &self.tcx.sess.target, sym::C)
477-
.unwrap()
478-
.clobbered_regs();
476+
let abi_clobber = InlineAsmClobberAbi::parse(
477+
self.arch,
478+
&self.tcx.sess.target,
479+
&self.tcx.sess.unstable_target_features,
480+
sym::C,
481+
)
482+
.unwrap()
483+
.clobbered_regs();
479484
for (i, reg) in self.registers.iter().enumerate().filter_map(|(i, r)| r.map(|r| (i, r))) {
480485
let mut need_save = true;
481486
// If the register overlaps with a register clobbered by function call, then

src/intrinsics/simd.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,8 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
415415
});
416416
}
417417

418-
sym::simd_fma => {
418+
// FIXME: simd_relaxed_fma doesn't relax to non-fused multiply-add
419+
sym::simd_fma | sym::simd_relaxed_fma => {
419420
intrinsic_args!(fx, args => (a, b, c); intrinsic);
420421

421422
if !a.layout().ty.is_simd() {

src/lib.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,13 @@ impl CodegenBackend for CraneliftCodegenBackend {
182182
// FIXME return the actually used target features. this is necessary for #[cfg(target_feature)]
183183
if sess.target.arch == "x86_64" && sess.target.os != "none" {
184184
// x86_64 mandates SSE2 support
185-
vec![Symbol::intern("fxsr"), sym::sse, Symbol::intern("sse2")]
185+
vec![sym::fsxr, sym::sse, sym::sse2]
186186
} else if sess.target.arch == "aarch64" {
187187
match &*sess.target.os {
188188
"none" => vec![],
189189
// On macOS the aes, sha2 and sha3 features are enabled by default and ring
190190
// fails to compile on macOS when they are not present.
191-
"macos" => vec![
192-
sym::neon,
193-
Symbol::intern("aes"),
194-
Symbol::intern("sha2"),
195-
Symbol::intern("sha3"),
196-
],
191+
"macos" => vec![sym::neon, sym::aes, sym::sha2, sym::sha3],
197192
// AArch64 mandates Neon support
198193
_ => vec![sym::neon],
199194
}

0 commit comments

Comments
 (0)