Skip to content

Commit 1678a6f

Browse files
authored
Merge branch 'release/8.0-staging' into backport/pr-98006-to-release/8.0
2 parents 04b486c + d49f6cf commit 1678a6f

File tree

91 files changed

+2031
-1897
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+2031
-1897
lines changed

THIRD-PARTY-NOTICES.TXT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ https://github.com/madler/zlib
7373
https://zlib.net/zlib_license.html
7474

7575
/* zlib.h -- interface of the 'zlib' general purpose compression library
76-
version 1.2.13, October 13th, 2022
76+
version 1.3.1, January 22nd, 2024
7777

7878
Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
7979

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
<!-- ICU -->
220220
<MicrosoftNETCoreRuntimeICUTransportVersion>8.0.0-rtm.23523.2</MicrosoftNETCoreRuntimeICUTransportVersion>
221221
<!-- MsQuic -->
222-
<MicrosoftNativeQuicMsQuicVersion>2.3.5</MicrosoftNativeQuicMsQuicVersion>
222+
<MicrosoftNativeQuicMsQuicSchannelVersion>2.2.3</MicrosoftNativeQuicMsQuicSchannelVersion>
223223
<SystemNetMsQuicTransportVersion>8.0.0-alpha.1.23527.1</SystemNetMsQuicTransportVersion>
224224
<!-- Mono LLVM -->
225225
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>16.0.5-alpha.1.23566.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>

eng/common/native/init-compiler.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if [ -z "$CLR_CC" ]; then
6363
# Set default versions
6464
if [ -z "$majorVersion" ]; then
6565
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
66-
if [ "$compiler" = "clang" ]; then versions="17 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5"
66+
if [ "$compiler" = "clang" ]; then versions="18 17 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5"
6767
elif [ "$compiler" = "gcc" ]; then versions="13 12 11 10 9 8 7 6 5 4.9"; fi
6868

6969
for version in $versions; do

eng/native/configurecompiler.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,9 @@ if (CLR_CMAKE_HOST_UNIX)
590590
# other clang 16.0 suppressions
591591
add_compile_options(-Wno-single-bit-bitfield-constant-conversion)
592592
add_compile_options(-Wno-cast-function-type-strict)
593+
594+
# clang 18.1 supressions
595+
add_compile_options(-Wno-switch-default)
593596
else()
594597
add_compile_options(-Wno-uninitialized)
595598
add_compile_options(-Wno-strict-aliasing)

eng/pipelines/libraries/stress/http.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ extends:
119119
lfs: false
120120

121121
- powershell: |
122+
# Workaround for https://github.com/microsoft/azure-pipelines-agent/issues/4554. Undo when the image bug is fixed.
123+
Remove-Item -Path "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.txt"
124+
122125
$(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION)
123126
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
124127
name: buildRuntime

eng/pipelines/libraries/stress/ssl.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ extends:
7676
lfs: false
7777

7878
- powershell: |
79+
# Workaround for https://github.com/microsoft/azure-pipelines-agent/issues/4554. Undo when the image bug is fixed.
80+
Remove-Item -Path "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.txt"
81+
7982
$(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION)
8083
displayName: Build CLR and Libraries
8184

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,6 +1111,75 @@ public IntPtr AddRef()
11111111
}
11121112
} // class CleanupWorkListElement
11131113

1114+
internal unsafe struct CopyConstructorCookie
1115+
{
1116+
private void* m_source;
1117+
1118+
private nuint m_destinationOffset;
1119+
1120+
public delegate*<void*, void*, void> m_copyConstructor;
1121+
1122+
public delegate*<void*, void> m_destructor;
1123+
1124+
public CopyConstructorCookie* m_next;
1125+
1126+
[StackTraceHidden]
1127+
public void ExecuteCopy(void* destinationBase)
1128+
{
1129+
if (m_copyConstructor != null)
1130+
{
1131+
m_copyConstructor((byte*)destinationBase + m_destinationOffset, m_source);
1132+
}
1133+
1134+
if (m_destructor != null)
1135+
{
1136+
m_destructor(m_source);
1137+
}
1138+
}
1139+
}
1140+
1141+
internal unsafe struct CopyConstructorChain
1142+
{
1143+
public void* m_realTarget;
1144+
public CopyConstructorCookie* m_head;
1145+
1146+
public void Add(CopyConstructorCookie* cookie)
1147+
{
1148+
cookie->m_next = m_head;
1149+
m_head = cookie;
1150+
}
1151+
1152+
[ThreadStatic]
1153+
private static CopyConstructorChain s_copyConstructorChain;
1154+
1155+
public void Install(void* realTarget)
1156+
{
1157+
m_realTarget = realTarget;
1158+
s_copyConstructorChain = this;
1159+
}
1160+
1161+
[StackTraceHidden]
1162+
private void ExecuteCopies(void* destinationBase)
1163+
{
1164+
for (CopyConstructorCookie* current = m_head; current != null; current = current->m_next)
1165+
{
1166+
current->ExecuteCopy(destinationBase);
1167+
}
1168+
}
1169+
1170+
[UnmanagedCallersOnly]
1171+
[StackTraceHidden]
1172+
public static void* ExecuteCurrentCopiesAndGetTarget(void* destinationBase)
1173+
{
1174+
void* target = s_copyConstructorChain.m_realTarget;
1175+
s_copyConstructorChain.ExecuteCopies(destinationBase);
1176+
// Reset this instance to ensure we don't accidentally execute the copies again.
1177+
// All of the pointers point to the stack, so we don't need to free any memory.
1178+
s_copyConstructorChain = default;
1179+
return target;
1180+
}
1181+
}
1182+
11141183
internal static class StubHelpers
11151184
{
11161185
[MethodImpl(MethodImplOptions.InternalCall)]

src/coreclr/jit/importer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9393,7 +9393,8 @@ void Compiler::impImportBlockCode(BasicBlock* block)
93939393
CORINFO_FIELD_INFO fi;
93949394
eeGetFieldInfo(&fldToken, CORINFO_ACCESS_SET, &fi);
93959395
unsigned flagsToCheck = CORINFO_FLG_FIELD_STATIC | CORINFO_FLG_FIELD_FINAL;
9396-
if ((fi.fieldFlags & flagsToCheck) == flagsToCheck)
9396+
if (((fi.fieldFlags & flagsToCheck) == flagsToCheck) &&
9397+
((info.compCompHnd->getClassAttribs(info.compClassHnd) & CORINFO_FLG_SHAREDINST) == 0))
93979398
{
93989399
#ifdef FEATURE_READYTORUN
93999400
if (opts.IsReadyToRun())

src/coreclr/jit/lowerxarch.cpp

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7652,26 +7652,47 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* parentNode, GenTre
76527652
}
76537653

76547654
case NI_SSE2_ConvertToVector128Double:
7655-
case NI_SSE3_MoveAndDuplicate:
76567655
case NI_AVX_ConvertToVector256Double:
7656+
case NI_AVX512F_ConvertToVector512Double:
7657+
case NI_AVX512F_VL_ConvertToVector128Double:
7658+
case NI_AVX512F_VL_ConvertToVector256Double:
76577659
{
76587660
assert(!supportsSIMDScalarLoads);
76597661

76607662
// Most instructions under the non-VEX encoding require aligned operands.
76617663
// Those used for Sse2.ConvertToVector128Double (CVTDQ2PD and CVTPS2PD)
7662-
// and Sse3.MoveAndDuplicate (MOVDDUP) are exceptions and don't fail for
7663-
// unaligned inputs as they read mem64 (half the vector width) instead
7664+
// are exceptions and don't fail for unaligned inputs as they read half
7665+
// the vector width instead
76647666

76657667
supportsAlignedSIMDLoads = !comp->opts.MinOpts();
76667668
supportsUnalignedSIMDLoads = true;
76677669

76687670
const unsigned expectedSize = genTypeSize(parentNode->TypeGet()) / 2;
76697671
const unsigned operandSize = genTypeSize(childNode->TypeGet());
76707672

7671-
// For broadcasts we can only optimize constants and memory operands
7672-
const bool broadcastIsContainable = childNode->OperIsConst() || childNode->isMemoryOp();
7673-
supportsGeneralLoads =
7674-
broadcastIsContainable && supportsUnalignedSIMDLoads && (operandSize >= expectedSize);
7673+
if (childNode->OperIsConst() || childNode->isMemoryOp())
7674+
{
7675+
// For broadcasts we can only optimize constants and memory operands
7676+
// since we're going from a smaller base type to a larger base type
7677+
supportsGeneralLoads = supportsUnalignedSIMDLoads && (operandSize >= expectedSize);
7678+
}
7679+
break;
7680+
}
7681+
7682+
case NI_SSE3_MoveAndDuplicate:
7683+
{
7684+
// Most instructions under the non-VEX encoding require aligned operands.
7685+
// Those used for Sse3.MoveAndDuplicate (MOVDDUP) are exceptions and don't
7686+
// fail for unaligned inputs as they read half the vector width instead
7687+
7688+
supportsAlignedSIMDLoads = !comp->opts.MinOpts();
7689+
supportsUnalignedSIMDLoads = true;
7690+
7691+
const unsigned expectedSize = genTypeSize(parentNode->TypeGet()) / 2;
7692+
const unsigned operandSize = genTypeSize(childNode->TypeGet());
7693+
7694+
supportsGeneralLoads = supportsUnalignedSIMDLoads && (operandSize >= expectedSize);
7695+
supportsSIMDScalarLoads = true;
76757696
break;
76767697
}
76777698

@@ -7697,8 +7718,6 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* parentNode, GenTre
76977718
break;
76987719
}
76997720
}
7700-
7701-
assert(supportsSIMDScalarLoads == false);
77027721
break;
77037722
}
77047723

src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ The .NET Foundation licenses this file to you under the MIT license.
166166
<LinkerArg Include="-Wl,--eh-frame-hdr" Condition="'$(_IsApplePlatform)' != 'true'" />
167167
</ItemGroup>
168168

169-
<Exec Command="xcodebuild -version" Condition="'$(_IsApplePlatform)' == 'true'" IgnoreExitCode="true" StandardOutputImportance="Low" ConsoleToMSBuild="true">
169+
<Exec Command="clang --version" Condition="'$(_IsApplePlatform)' == 'true'" IgnoreExitCode="true" StandardOutputImportance="Low" ConsoleToMSBuild="true">
170170
<Output TaskParameter="ExitCode" PropertyName="_XcodeVersionStringExitCode" />
171171
<Output TaskParameter="ConsoleOutput" PropertyName="_XcodeVersionString" />
172172
</Exec>

0 commit comments

Comments
 (0)