Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 5.6k
[cdac] SystemV-AMD64 struct-in-register classifier: enable ARGITER + zero-known-issues on Linux x64#130257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
[cdac] SystemV-AMD64 struct-in-register classifier: enable ARGITER + zero-known-issues on Linux x64 #130257
Changes from all commits
5e5874ee59c74770e0285511d49ea26fedaa6c77e5122dabeFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -121,7 +121,48 @@ public int GetHomogeneousAggregateElementSize() | ||
| public void GetSystemVAmd64PassStructInRegisterDescriptor(out SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR descriptor) | ||
| { | ||
| throw new NotImplementedException("SystemV AMD64 struct-in-registers is not yet supported by the cDAC."); | ||
| descriptor = default; | ||
| descriptor.passedInRegisters = false; | ||
max-charlamb marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| if (_typeHandle.IsNull) | ||
| return; | ||
| // Read the runtime-cached classification from EEClassOptionalFields; | ||
| // mirrors SystemVRegDescriptorFromSystemVEightByteRegistersInfo in | ||
| // jitinterface.cpp. Field only populated on UNIX_AMD64_ABI builds. | ||
| TargetPointer eeClassPtr = Rts.GetClassPointer(_typeHandle); | ||
| if (eeClassPtr == TargetPointer.Null) | ||
| return; | ||
| Data.EEClass eeClass = _target.ProcessedData.GetOrAdd<Data.EEClass>(eeClassPtr); | ||
| if (eeClass.OptionalFields == TargetPointer.Null) | ||
| return; | ||
| Data.EEClassOptionalFields optFields = _target.ProcessedData.GetOrAdd<Data.EEClassOptionalFields>(eeClass.OptionalFields); | ||
| if (optFields.EightByteRegistersInfo is not Data.SystemVEightByteRegistersInfo info) | ||
| return; | ||
| if (info.NumEightBytes == 0) | ||
| return; | ||
| // Runtime contract: at most CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS (2) | ||
| // eightbytes. Treat a corrupted / out-of-range count as "not passed in | ||
| // registers" so downstream loops keyed off eightByteCount can't overrun. | ||
| if (info.NumEightBytes > 2) | ||
| return; | ||
| descriptor.passedInRegisters = true; | ||
| descriptor.eightByteCount = info.NumEightBytes; | ||
| descriptor.eightByteClassifications0 = (SystemVClassificationType)info.EightByteClassification0; | ||
| descriptor.eightByteSizes0 = info.EightByteSize0; | ||
| descriptor.eightByteOffsets0 = 0; | ||
| if (info.NumEightBytes > 1) | ||
| { | ||
| descriptor.eightByteClassifications1 = (SystemVClassificationType)info.EightByteClassification1; | ||
| descriptor.eightByteSizes1 = info.EightByteSize1; | ||
| descriptor.eightByteOffsets1 = SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR.SYSTEMV_EIGHT_BYTE_SIZE_IN_BYTES; | ||
| } | ||
| } | ||
| public FpStructInRegistersInfo GetFpStructInRegistersInfo(Internal.TypeSystem.TargetArchitecture architecture) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| namespace Microsoft.Diagnostics.DataContractReader.Data; | ||
| [CdacType(nameof(DataType.EEClassOptionalFields))] | ||
| internal sealed partial class EEClassOptionalFields : IData<EEClassOptionalFields> | ||
| { | ||
| [Field] public SystemVEightByteRegistersInfo? EightByteRegistersInfo { get; } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| namespace Microsoft.Diagnostics.DataContractReader.Data; | ||
| [CdacType(nameof(DataType.SystemVEightByteRegistersInfo))] | ||
| internal sealed partial class SystemVEightByteRegistersInfo : IData<SystemVEightByteRegistersInfo> | ||
| { | ||
| // Slots beyond NumEightBytes are undefined. | ||
| [Field] public byte NumEightBytes { get; } | ||
| [Field] public byte EightByteClassification0 { get; } | ||
| [Field] public byte EightByteClassification1 { get; } | ||
| [Field] public byte EightByteSize0 { get; } | ||
| [Field] public byte EightByteSize1 { get; } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -62,6 +62,8 @@ public enum DataType | ||
| MethodTable, | ||
| DynamicStaticsInfo, | ||
| EEClass, | ||
| EEClassOptionalFields, | ||
| SystemVEightByteRegistersInfo, | ||
max-charlamb marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| CoreLibBinder, | ||
max-charlamb marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. max-charlamb marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| MethodTableAuxiliaryData, | ||
| GenericsDictInfo, | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.