2
0
Эх сурвалжийг харах

ARM64: Enable moving ArgOuts next to call for arm64

Correct #if for SetFPUControlDefault and SetFPUControl
Sandeep Agarwal 8 жил өмнө
parent
commit
62ac58a56d

+ 2 - 3
lib/Backend/FlowGraph.cpp

@@ -325,10 +325,9 @@ FlowGraph::Build(void)
                     instr->m_func->SetHasCallsOnSelfAndParents();
                 }
 
-                // For ARM & X64 because of their register calling convention
+                // For ARM, ARM64 & X64 (non x86) because of their register calling convention
                 // the ArgOuts need to be moved next to the call.
-#if defined(_M_ARM) || defined(_M_X64)
-
+#if !defined(_M_IX86)
                 IR::Instr* argInsertInstr = instr;
                 instr->IterateArgInstrs([&](IR::Instr* argInstr)
                 {

+ 2 - 2
lib/Common/Common/SmartFpuControl.cpp

@@ -16,7 +16,7 @@
 static errno_t SetFPUControlDefault(void)
 {
 #if _WIN32
-#if _M_AMD64 || _M_ARM
+#if _M_AMD64 || _M_ARM || _M_ARM64
     return _controlfp_s(0, _RC_NEAR + _DN_SAVE + _EM_INVALID + _EM_ZERODIVIDE +
         _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT,
         _MCW_EM | _MCW_DN | _MCW_RC);
@@ -49,7 +49,7 @@ static errno_t GetFPUControl(unsigned int *pctrl)
 static errno_t SetFPUControl(unsigned int fpctrl)
 {
 #if _WIN32
-#if _M_AMD64 || _M_ARM
+#if _M_AMD64 || _M_ARM || _M_ARM64
     return _controlfp_s(0, fpctrl, _MCW_EM | _MCW_DN | _MCW_RC);
 #elif _M_IX86
     _control87(fpctrl, (unsigned int)(-1));