private IntPtr ArgPtr; // Pointer to remaining args.
private int RemainingArgs; // # of remaining args.
-#if VARARGS_ENABLED //The JIT doesn't support Varargs calling convention.
+#if PLATFORM_WINDOWS // Native Varargs are not supported on Unix
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern ArgIterator(IntPtr arglist);
{
throw new NotSupportedException(SR.NotSupported_NYI);
}
-#else
+#else
public ArgIterator(RuntimeArgumentHandle arglist)
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_ArgIterator); // https://github.com/dotnet/coreclr/issues/9204
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_ArgIterator); // https://github.com/dotnet/coreclr/issues/9204
}
-#endif //VARARGS_ENABLED
+#endif // PLATFORM_WINDOWS
}
}
isHfaArg = varTypeIsFloating(hfaType);
}
}
+ else if (info.compIsVarArgs)
+ {
+#ifdef _TARGET_UNIX_
+ // Currently native varargs is not implemented on non windows targets.
+ //
+ // Note that some targets like Arm64 Unix should not need much work as
+ // the ABI is the same. While other targets may only need small changes
+ // such as amd64 Unix, which just expects RAX to pass numFPArguments.
+ NYI("InitUserArgs for Vararg callee is not yet implemented on non Windows targets.");
+#endif
+ }
+
if (isHfaArg)
{
// We have an HFA argument, so from here on out treat the type as a float or double.
unsigned nonRegPassedStructSlots = 0;
bool reMorphing = call->AreArgsComplete();
bool callHasRetBuffArg = call->HasRetBufArg();
+ bool callIsVararg = call->IsVarargs();
-#ifndef _TARGET_X86_ // i.e. _TARGET_AMD64_ or _TARGET_ARM_
- bool callIsVararg = call->IsVarargs();
-#endif
+#ifdef _TARGET_UNIX_
+ if (callIsVararg)
+ {
+ // Currently native varargs is not implemented on non windows targets.
+ //
+ // Note that some targets like Arm64 Unix should not need much work as
+ // the ABI is the same. While other targets may only need small changes
+ // such as amd64 Unix, which just expects RAX to pass numFPArguments.
+ NYI("Morphing Vararg call not yet implemented on non Windows targets.");
+ }
+#endif // _TARGET_UNIX_
#ifdef UNIX_AMD64_ABI
// If fgMakeOutgoingStructArgCopy is called and copies are generated, hasStackArgCopy is set
IfFailThrow(sig.GetCallingConvInfo(&data));
sigRet->callConv = (CorInfoCallConv) data;
+#ifdef PLATFORM_UNIX
if ((isCallConv(sigRet->callConv, IMAGE_CEE_CS_CALLCONV_VARARG)) ||
(isCallConv(sigRet->callConv, IMAGE_CEE_CS_CALLCONV_NATIVEVARARG)))
{
// This signature corresponds to a method that uses varargs, which are not supported.
COMPlusThrow(kInvalidProgramException, IDS_EE_VARARG_NOT_SUPPORTED);
}
+#endif // PLATFORM_UNIX
// Skip number of type arguments
if (sigRet->callConv & IMAGE_CEE_CS_CALLCONV_GENERIC)
Categories=EXPECTED_PASS;Pri1
HostStyle=0
-[varargsupport_r.cmd_6076]
-RelativePath=baseservices\varargs\varargsupport_r\varargsupport_r.cmd
-WorkingDir=baseservices\varargs\varargsupport_r
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS
-HostStyle=0
-
[_il_relcatchfault_tail.cmd_6077]
RelativePath=JIT\Methodical\Invoke\SEH\_il_relcatchfault_tail\_il_relcatchfault_tail.cmd
WorkingDir=JIT\Methodical\Invoke\SEH\_il_relcatchfault_tail
Categories=EXPECTED_PASS
HostStyle=0
-[varargsupport.cmd_9339]
-RelativePath=baseservices\varargs\varargsupport\varargsupport.cmd
-WorkingDir=baseservices\varargs\varargsupport
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS
-HostStyle=0
-
[uint8_d.cmd_9340]
RelativePath=JIT\Directed\shift\uint8_d\uint8_d.cmd
WorkingDir=JIT\Directed\shift\uint8_d
Categories=EXPECTED_PASS;Pri1
HostStyle=0
-[varargsupport.cmd_576]
-RelativePath=baseservices\varargs\varargsupport\varargsupport.cmd
-WorkingDir=baseservices\varargs\varargsupport
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS
-HostStyle=0
-
-[varargsupport_r.cmd_577]
-RelativePath=baseservices\varargs\varargsupport_r\varargsupport_r.cmd
-WorkingDir=baseservices\varargs\varargsupport_r
-Expected=0
-MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS
-HostStyle=0
-
[Co9600Ctor.cmd_578]
RelativePath=CoreMangLib\components\stopwatch\Co9600Ctor\Co9600Ctor.cmd
WorkingDir=CoreMangLib\components\stopwatch\Co9600Ctor
<ExcludeList Include="$(XunitTestBinBase)\JIT\Regression\JitBlue\GitHub_18056\Bool_And_Op_cs_do\Bool_And_Op_cs_do.cmd">
<Issue>18056</Issue>
</ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)\baseservices\varargs\varargsupport\varargsupport.cmd">
+ <Issue>Varargs supported on this platform</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)\baseservices\varargs\varargsupport_r\varargsupport_r.cmd">
+ <Issue>Varargs supported on this platform</Issue>
+ </ExcludeList>
</ItemGroup>
<!-- The following are x86 failures -->