@@ -1258,87 +1258,6 @@ void CallArgABIInformation::SetHfaType(var_types type, unsigned hfaSlots)
1258
1258
}
1259
1259
}
1260
1260
1261
- //---------------------------------------------------------------
1262
- // SetByteSize: Set information related to this argument's size and alignment.
1263
- //
1264
- // Arguments:
1265
- // byteSize - The size in bytes of the argument.
1266
- // byteAlignment - The alignment in bytes of the argument.
1267
- // isStruct - Whether this arg is a struct.
1268
- // isFloatHfa - Whether this is a float HFA.
1269
- //
1270
- // Remarks:
1271
- // This function will determine how the argument size needs to be rounded. On
1272
- // most ABIs all arguments are rounded to stack pointer size, but Apple arm64
1273
- // ABI is an exception as it allows packing some small arguments into the
1274
- // same stack slot.
1275
- //
1276
- void CallArgABIInformation::SetByteSize(unsigned byteSize, unsigned byteAlignment, bool isStruct, bool isFloatHfa)
1277
- {
1278
- unsigned roundedByteSize;
1279
- if (compAppleArm64Abi())
1280
- {
1281
- // Only struct types need extension or rounding to pointer size, but HFA<float> does not.
1282
- if (isStruct && !isFloatHfa)
1283
- {
1284
- roundedByteSize = roundUp(byteSize, TARGET_POINTER_SIZE);
1285
- }
1286
- else
1287
- {
1288
- roundedByteSize = byteSize;
1289
- }
1290
- }
1291
- else
1292
- {
1293
- roundedByteSize = roundUp(byteSize, TARGET_POINTER_SIZE);
1294
- }
1295
-
1296
- #if !defined(TARGET_ARM)
1297
- // Arm32 could have a struct with 8 byte alignment
1298
- // which rounded size % 8 is not 0.
1299
- assert(byteAlignment != 0);
1300
- assert(roundedByteSize % byteAlignment == 0);
1301
- #endif // TARGET_ARM
1302
-
1303
- ByteSize = roundedByteSize;
1304
- ByteAlignment = byteAlignment;
1305
- }
1306
-
1307
- //---------------------------------------------------------------
1308
- // SetMultiRegsNumw: Set the registers for a multi-reg arg using 'sequential' registers.
1309
- //
1310
- // Remarks:
1311
- // This assumes that `NumRegs` and the first reg num has already been set and
1312
- // determines how many sequential registers are necessary to pass the
1313
- // argument.
1314
- // Note that on ARM the registers set may skip odd float registers if the arg
1315
- // is a HFA of doubles, since double and float registers overlap.
1316
- void CallArgABIInformation::SetMultiRegNums()
1317
- {
1318
- #if FEATURE_MULTIREG_ARGS && !defined(UNIX_AMD64_ABI) && !defined(TARGET_LOONGARCH64) && !defined(TARGET_RISCV64)
1319
- if (NumRegs == 1)
1320
- {
1321
- return;
1322
- }
1323
-
1324
- regNumber argReg = GetRegNum(0);
1325
- #ifdef TARGET_ARM
1326
- unsigned int regSize = (GetHfaType() == TYP_DOUBLE) ? 2 : 1;
1327
- #else
1328
- unsigned int regSize = 1;
1329
- #endif
1330
-
1331
- if (NumRegs > MAX_ARG_REG_COUNT)
1332
- NO_WAY("Multireg argument exceeds the maximum length");
1333
-
1334
- for (unsigned int regIndex = 1; regIndex < NumRegs; regIndex++)
1335
- {
1336
- argReg = (regNumber)(argReg + regSize);
1337
- SetRegNum(regIndex, argReg);
1338
- }
1339
- #endif // FEATURE_MULTIREG_ARGS && !defined(UNIX_AMD64_ABI) && !defined(TARGET_LOONGARCH64) && !defined(TARGET_RISCV64)
1340
- }
1341
-
1342
1261
//---------------------------------------------------------------
1343
1262
// GetStackByteSize: Get the number of stack bytes used to pass this argument.
1344
1263
//
@@ -1468,7 +1387,7 @@ void CallArg::CheckIsStruct()
1468
1387
CallArgs::CallArgs()
1469
1388
: m_head(nullptr)
1470
1389
, m_lateHead(nullptr)
1471
- , m_nextStackByteOffset (0)
1390
+ , m_argsStackSize (0)
1472
1391
#ifdef UNIX_X86_ABI
1473
1392
, m_stkSizeBytes(0)
1474
1393
, m_padStkAlign(0)
@@ -9817,7 +9736,7 @@ void CallArgs::InternalCopyFrom(Compiler* comp, CallArgs* other, CopyNodeFunc co
9817
9736
{
9818
9737
assert((m_head == nullptr) && (m_lateHead == nullptr));
9819
9738
9820
- m_nextStackByteOffset = other->m_nextStackByteOffset ;
9739
+ m_argsStackSize = other->m_argsStackSize ;
9821
9740
m_hasThisPointer = other->m_hasThisPointer;
9822
9741
m_hasRetBuffer = other->m_hasRetBuffer;
9823
9742
m_isVarArgs = other->m_isVarArgs;
@@ -9845,6 +9764,7 @@ void CallArgs::InternalCopyFrom(Compiler* comp, CallArgs* other, CopyNodeFunc co
9845
9764
carg->m_isTmp = arg.m_isTmp;
9846
9765
carg->m_processed = arg.m_processed;
9847
9766
carg->AbiInfo = arg.AbiInfo;
9767
+ carg->NewAbiInfo = arg.NewAbiInfo;
9848
9768
*tail = carg;
9849
9769
tail = &carg->m_next;
9850
9770
}
@@ -13174,6 +13094,8 @@ const char* Compiler::gtGetWellKnownArgNameForArgMsg(WellKnownArg arg)
13174
13094
return "swift error";
13175
13095
case WellKnownArg::SwiftSelf:
13176
13096
return "swift self";
13097
+ case WellKnownArg::X86TailCallSpecialArg:
13098
+ return "tail call";
13177
13099
default:
13178
13100
return nullptr;
13179
13101
}
0 commit comments