summaryrefslogtreecommitdiff
path: root/src/jit/lower.cpp
diff options
context:
space:
mode:
authorCarol Eidt <carol.eidt@microsoft.com>2018-03-15 08:21:25 -0700
committerCarol Eidt <carol.eidt@microsoft.com>2018-04-17 16:15:14 -0700
commit32480530dbcd0936e4292bdd50e5a94002f8dba2 (patch)
tree333c33b54dce6addf25ec10419e7eb8ed742e05f /src/jit/lower.cpp
parent963e5a9f08ed7c664036ef9b7050374b66f71d64 (diff)
downloadcoreclr-32480530dbcd0936e4292bdd50e5a94002f8dba2.tar.gz
coreclr-32480530dbcd0936e4292bdd50e5a94002f8dba2.tar.bz2
coreclr-32480530dbcd0936e4292bdd50e5a94002f8dba2.zip
Unix/x64 ABI cleanup
Eliminate `FEATURE_UNIX_AMD64_STRUCT_PASSING` and replace it with `UNIX_AMD64_ABI` when used alone. Both are currently defined; it is highly unlikely the latter will work alone; and it significantly clutters up the code, especially the JIT. Also, fix the altjit support (now `UNIX_AMD64_ABI_ITF`) to *not* call `ClassifyEightBytes` if the struct is too large. Otherwise it asserts.
Diffstat (limited to 'src/jit/lower.cpp')
-rw-r--r--src/jit/lower.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/jit/lower.cpp b/src/jit/lower.cpp
index 3f609e70e4..928a4e76fd 100644
--- a/src/jit/lower.cpp
+++ b/src/jit/lower.cpp
@@ -978,12 +978,12 @@ void Lowering::ReplaceArgWithPutArgOrBitcast(GenTree** argSlot, GenTree* putArgO
// call, arg, and info must be non-null.
//
// Notes:
-// For System V systems with native struct passing (i.e. FEATURE_UNIX_AMD64_STRUCT_PASSING defined)
+// For System V systems with native struct passing (i.e. UNIX_AMD64_ABI defined)
// this method allocates a single GT_PUTARG_REG for 1 eightbyte structs and a GT_FIELD_LIST of two GT_PUTARG_REGs
// for two eightbyte structs.
//
// For STK passed structs the method generates GT_PUTARG_STK tree. For System V systems with native struct passing
-// (i.e. FEATURE_UNIX_AMD64_STRUCT_PASSING defined) this method also sets the GC pointers count and the pointers
+// (i.e. UNIX_AMD64_ABI defined) this method also sets the GC pointers count and the pointers
// layout object, so the codegen of the GT_PUTARG_STK could use this for optimizing copying to the stack by value.
// (using block copy primitives for non GC pointers and a single TARGET_POINTER_SIZE copy with recording GC info.)
//
@@ -997,7 +997,7 @@ GenTree* Lowering::NewPutArg(GenTreeCall* call, GenTree* arg, fgArgTabEntry* inf
bool updateArgTable = true;
bool isOnStack = true;
-#ifdef FEATURE_UNIX_AMD64_STRUCT_PASSING
+#ifdef UNIX_AMD64_ABI
if (varTypeIsStruct(type))
{
isOnStack = !info->structDesc.passedInRegisters;
@@ -1006,9 +1006,9 @@ GenTree* Lowering::NewPutArg(GenTreeCall* call, GenTree* arg, fgArgTabEntry* inf
{
isOnStack = info->regNum == REG_STK;
}
-#else // !FEATURE_UNIX_AMD64_STRUCT_PASSING
+#else // !UNIX_AMD64_ABI
isOnStack = info->regNum == REG_STK;
-#endif // !FEATURE_UNIX_AMD64_STRUCT_PASSING
+#endif // !UNIX_AMD64_ABI
#ifdef _TARGET_ARMARCH_
// Mark contained when we pass struct
@@ -1088,7 +1088,7 @@ GenTree* Lowering::NewPutArg(GenTreeCall* call, GenTree* arg, fgArgTabEntry* inf
{
if (!isOnStack)
{
-#if defined(FEATURE_UNIX_AMD64_STRUCT_PASSING)
+#if defined(UNIX_AMD64_ABI)
if (info->isStruct)
{
// The following code makes sure a register passed struct arg is moved to
@@ -1203,7 +1203,7 @@ GenTree* Lowering::NewPutArg(GenTreeCall* call, GenTree* arg, fgArgTabEntry* inf
}
}
else
-#else // not defined(FEATURE_UNIX_AMD64_STRUCT_PASSING)
+#else // not defined(UNIX_AMD64_ABI)
#if FEATURE_MULTIREG_ARGS
if ((info->numRegs > 1) && (arg->OperGet() == GT_FIELD_LIST))
{
@@ -1245,7 +1245,7 @@ GenTree* Lowering::NewPutArg(GenTreeCall* call, GenTree* arg, fgArgTabEntry* inf
}
else
#endif // FEATURE_MULTIREG_ARGS
-#endif // not defined(FEATURE_UNIX_AMD64_STRUCT_PASSING)
+#endif // not defined(UNIX_AMD64_ABI)
{
putArg = comp->gtNewPutArgReg(type, arg, info->regNum);
}