-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
feat: add efiapi support for loongarch64 #149879
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,6 +61,7 @@ impl AbiMap { | |
| Arch::RiscV32 | Arch::RiscV64 => ArchKind::Riscv, | ||
| Arch::X86 => ArchKind::X86, | ||
| Arch::X86_64 => ArchKind::X86_64, | ||
| Arch::LoongArch64 => ArchKind::LoongArch64, | ||
| _ => ArchKind::Other, | ||
| }; | ||
|
|
||
|
|
@@ -108,7 +109,10 @@ impl AbiMap { | |
|
|
||
| (ExternAbi::EfiApi, ArchKind::Arm(..)) => CanonAbi::Arm(ArmCall::Aapcs), | ||
| (ExternAbi::EfiApi, ArchKind::X86_64) => CanonAbi::X86(X86Call::Win64), | ||
| (ExternAbi::EfiApi, ArchKind::Aarch64 | ArchKind::Riscv | ArchKind::X86) => CanonAbi::C, | ||
| ( | ||
| ExternAbi::EfiApi, | ||
| ArchKind::Aarch64 | ArchKind::Riscv | ArchKind::X86 | ArchKind::LoongArch64, | ||
| ) => CanonAbi::C, | ||
ZR233 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| (ExternAbi::EfiApi, _) => return AbiMapping::Invalid, | ||
|
|
||
| /* arm */ | ||
|
|
@@ -201,6 +205,7 @@ enum ArchKind { | |
| Riscv, | ||
| X86, | ||
| X86_64, | ||
| LoongArch64, | ||
| /// Architectures which don't need other considerations for ABI lowering | ||
| Other, | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should support be added in
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, that was intentionally not done in #111499, so I'm unsure here?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reference should be updated as well: https://doc.rust-lang.org/reference/items/external-blocks.html#r-items.extern.abi.efiapi |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only LoongArch64? Isn't LoongArch32 the same?