-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[API Proposal]: Add architecture PPC64le to Architecture enum #67428
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsBackground and motivationAll architectures, whether officially Microsoft supported or not, need to exist within the System.Runtime.InteropServices.Architecture enum. We want to introduce a new community-supported architecture ppc64le. API Proposal
API Usage
Alternative DesignsNo response RisksNo response
|
Why all caps? The architecture seems to be referred to as PowerPC everywhere, not POWERPC (e.g. wikipedia: https://en.wikipedia.org/wiki/PowerPC). |
Agree. Changed |
This comment was marked as outdated.
This comment was marked as outdated.
Should this be |
Or |
We don't represent float support in
We don't represent endianness in |
Other architectures/ABIs are differentiating, including the PE file format. That may or may not be important when considering the Architecture enum. It's a consideration that should be made. |
While Arm technically can run in big-endian mode, practically all implementations and ports are for little-endian (e.g. there's no big-endian Linux support) so the distinction is less important. PowerPC on the other hand shipped as primarily big-endian for much of its lifetime while the little-endian |
As per my understanding LE is not required as we can check using |
powerpc64 (sometimes ppc64) is used by other open source stuff for big endian. And BE is supported on Linux. I use powerpc64 BE Linux servers all the time. |
Labeling this as "Future" is not meant to indicate it isn't important but more bookkeeping on our side. As soon as all stakeholders agree on what should be the correct name, we can flip this to "ready for review". |
Agreed. We should use the label PowerPC64le. to make it clear that this is for the little endian powerpc64 platform. |
I think in that case we should use PowerPC64le which indicates 64-bit power pc and little endian
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Janani Janakiraman ***@***.***>
Sent: Monday, April 4, 2022 10:14 PM
To: dotnet/runtime ***@***.***>
Cc: Sapana Khemkar ***@***.***>; Mention ***@***.***>
Subject: [EXTERNAL] Re: [dotnet/runtime] [API Proposal]: Add architecture PowerPC64 to Architecture enum (Issue #67428)
powerpc64 (sometimes ppc64) is used by other open source stuff for big endian. powerpc64le (sometimes ppc64le) is used for little endian. And BE is supported on Linux. I use powerpc64 BE Linux servers all the time. Agreed. We should use the ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
powerpc64 (sometimes ppc64) is used by other open source stuff for big endian. powerpc64le (sometimes ppc64le) is used for little endian.
And BE is supported on Linux. I use powerpc64 BE Linux servers all the time.
Agreed. We should use the label PowerPCLE. to make it clear that this is for the little endian powerpc64 platform.
—
Reply to this email directly, view it on GitHub<#67428 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWNRWBGEDCGLJ7NXQ33TQH3VDML5DANCNFSM5SIEFHOA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Are we all okay with enum name PowerPC64le? |
I'm not the decision maker but I still don't see the reason to include endianness. We don't include it for ARM. We also don't include float mode on ARM (even though Linux does distinguish soft and hard float modes when referring to the ISA and we do support both on the VM side). This enum has so far represented the ISA, not the binary interface (see also #26634 (comment)). Adding the endianness doesn't fit with the rest. |
If I change Architecture enum to PowerPC64 then |
Do the other architectures match the linux reported architecture names? In any case ppc64le should work fine. |
For what it is worth I checked on my mac and the architecture there is reported as "i386" and on my old Linux thinkpad it is reported as "x86_64" neither of which seem to match the X86 in the enum list. |
My understanding is the following. Please correct me if any of these assumptions is wrong:
If that is true, it follows that we would need two different RID values for big- and little-endian PowerPC, and therefore two different Architecture enum values, because BE and LE PowerPC are different platforms that are not binary compatible. (This is not only due to byte order, they also use different ABIs.) The next question is whether to use This actually is very similar to the situation on 64-bit Arm, where the Linux kernel uses The final question would be about upper/lower casing of the Architecture enum (the RID is all lower case anyway). Coding standards seem to require that enum values start with an upper case letter, so some of the options would be |
We use the I don't think |
That test happens to work for the architectures we run tests on. Armel is community supported. Armbe RID for big endian arm would be in the same boat if it's ever added. |
What further information is needed to close on this issue? Since the Power BE and LE are completely incompatible like Ulrich mentioned, including the endianness in the name is preferred. |
Throughout thousands of communities, we use the ppc64le tag to identify our architecture. There is the historical big endian architecture on linux which IBM doesn't support, although various communities still do, including the older mono. We also have AIX and IBM i people who have done the old mono and have expressed some interest in getting full .NET on those architectures which are big endian, along with a different API, different libraries, etc. They are about as much alike as Windows and Linux now. I would strongly recommend using a ppc64le variant for this. |
@AaronRobinsonMSFT (or someone else), can this move forward? Adding community support for PPC64le is underway. You can decide on the name at the API review. |
We should move forward with
tl;dr: Only names with endianness included are meaningful. Either |
Could you also consider adding support for ppc 32 bits ? |
That's out of scope for this PR, we prefer to only add arches to the enum which are explicitly being used, and there's active work underway at IBM's end to support PPC64le. Until there's signs of life on a big-endian PPC32 port, it'd be pointless adding to this API change. |
Show we mark this as blocking like other architecture name PR, since there's supporting PR ready? |
@AaronRobinsonMSFT @jkoritzinsky can you please review this? |
Will try to push on this to get it through API review ASAP. |
API review board should spend some time discussing the purpose of this enum. RID and Architecture are currently disconnected so if we want a 1:1 relationship with the RID like the comments are asking for (adding PowerPC64LE instead of PowerPC64), we might want to consider adding The armel RID already exists (it's solving the problem with native assets @directhex refers to because it's the same issue), but we don't have an |
@AaronRobinsonMSFT @MichalStrehovsky any update on this. When API review board meets? |
@Sapana-Khemkar This is on the docket for me to rally support for again. Some questions that keep coming up are around RIDs - that particular angle is causing a fair bit of debate. Please ping me tomorrow if I don't respond here later today. |
Thanks @teo-tsirpanis, have not forgotten about this. I think we've reached a point where we can move forward. @directhex is going to help guide this through the API review. They will set the issue to blocking when it aligns with their availability. |
Thanks @AaronRobinsonMSFT for update |
namespace System.Runtime.InteropServices
{
public enum Architecture
{
X86 = 0,
X64 = 1,
Arm = 2,
Arm64 = 3,
Wasm = 4,
S390x = 5,
LoongArch64 = 6,
Armv6 = 7,
+ Ppc64le = 8,
}
} |
Background and motivation
All architectures, whether officially Microsoft supported or not, need to exist within the System.Runtime.InteropServices.Architecture enum. We want to introduce a new community-supported architecture ppc64le.
The implementation PR is #68809
API Proposal
namespace System.Runtime.InteropServices { public enum Architecture { X86 = 0, X64 = 1, Arm = 2, Arm64 = 3, Wasm = 4, S390x = 5, LoongArch64 = 6, Armv6 = 7, + PPC64le = 8, } }
API Usage
Alternative Designs
No response
Risks
No response
The text was updated successfully, but these errors were encountered: