[x86/Linux] Introduce UNIX_X86_ABI definition (dotnet/coreclr#8863)
authorSaeHie Park <saehie.park@gmail.com>
Tue, 10 Jan 2017 23:42:12 +0000 (08:42 +0900)
committerJan Vorlicek <janvorli@microsoft.com>
Tue, 10 Jan 2017 23:42:12 +0000 (00:42 +0100)
Add UNIX_X86_ABI definition for Unix/Linux specific ABI parts
First will be for 16 byte stack alignment codes

Commit migrated from https://github.com/dotnet/coreclr/commit/7bb52294ab9d555d773eb5f64e2fbd876d1a5dff

src/coreclr/clrdefinitions.cmake
src/coreclr/src/jit/target.h

index acca50a..7719450 100644 (file)
@@ -57,6 +57,8 @@ if (CLR_CMAKE_PLATFORM_UNIX)
     add_definitions(-DUNIX_AMD64_ABI)
   elseif (CLR_CMAKE_PLATFORM_UNIX_ARM)
     add_definitions(-DUNIX_ARM_ABI)
+  elseif (CLR_CMAKE_PLATFORM_UNIX_X86)
+    add_definitions(-DUNIX_X86_ABI)
   endif()
 
 endif(CLR_CMAKE_PLATFORM_UNIX)
index 8b448a2..32eb166 100644 (file)
 #endif
 #endif
 
+// If the UNIX_X86_ABI is defined make sure that _TARGET_X86_ is also defined.
+#if defined(UNIX_X86_ABI)
+#if !defined(_TARGET_X86_)
+#error When UNIX_X86_ABI is defined you must define _TARGET_X86_ defined as well.
+#endif
+#endif
+
 #if (defined(FEATURE_CORECLR) && defined(PLATFORM_UNIX))
 #define FEATURE_VARARG 0
 #else // !(defined(FEATURE_CORECLR) && defined(PLATFORM_UNIX))