From b02e6e222fa96e27349a20df4635fa934d9527bc Mon Sep 17 00:00:00 2001 From: sguo35 Date: Mon, 11 Jul 2022 12:51:24 -0700 Subject: [PATCH] arm64: enable fma and "avx" on Apple and Cortex CPUs --- rpcs3/Emu/CPU/CPUTranslator.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rpcs3/Emu/CPU/CPUTranslator.cpp b/rpcs3/Emu/CPU/CPUTranslator.cpp index 18d8254e2e..77e1ef1343 100644 --- a/rpcs3/Emu/CPU/CPUTranslator.cpp +++ b/rpcs3/Emu/CPU/CPUTranslator.cpp @@ -140,6 +140,14 @@ void cpu_translator::initialize(llvm::LLVMContext& context, llvm::ExecutionEngin m_use_avx512_icl = true; m_use_vnni = true; } + + // Aarch64 CPUs + if (cpu == "cyclone" || cpu.contains("cortex")) + { + m_use_fma = true; + // AVX does not use intrinsics so far + m_use_avx = true; + } } llvm::Value* cpu_translator::bitcast(llvm::Value* val, llvm::Type* type) const