-
Notifications
You must be signed in to change notification settings - Fork 227
Add __chkstk
for arm64ec-pc-windows-msvc
#812
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
base: master
Are you sure you want to change the base?
Conversation
I’ll take a look at the implementation soon, do you have a repo that gets linker errors without this function? |
|
I did not know what to put :/ maybe I should just put a "cfg (windows)" as
LLVM says it is windows only ?
I just tried to see which arm target is for Windows :/ and just found this
one
Le mar. 8 avr. 2025 à 10:49, beetrees ***@***.***> a écrit :
…
- This will currently always get configured out currently as the arm
module is cfg(target_arch = "arm") (which is 32-bit ARM):
https://github.com/rust-lang/compiler-builtins/blob/1901c415975eae741b7b072e789e74c6e422c22a/compiler-builtins/src/lib.rs#L50-L51
whereas the new assembly is only enabled when cfg(target_arch =
"arm64ec").
- The assembly from ***@***.***
<llvm/llvm-project@946a81f> is for 32-bit
ARM, whereas arm64ec is a 64-bit platform (LLVM's 64-bit ARM assembly
can be found here
<https://github.com/llvm/llvm-project/blob/f0bdeb4b6aa1ee0653aed8323a5a7485fb930a05/compiler-rt/lib/builtins/aarch64/chkstk.S>).
compiler-builtins already has the 64-bit ARM version of the assembly
in the aarch64 module
<https://github.com/rust-lang/compiler-builtins/blob/master/compiler-builtins/src/aarch64.rs>,
although it is currently cfg(target_os = "uefi").
- According to Understanding Arm64EC ABI and assembly code
<https://learn.microsoft.com/en-us/windows/arm/arm64ec-abi>, the
__chkstk function for Arm64EC code is called __chkstk_arm64ec.
—
Reply to this email directly, view it on GitHub
<#812 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGJPV632FRDEU7IT6WA3CT2YOETFAVCNFSM6AAAAAB2UWP2J6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBVG4YDKOJZGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: beetrees]*beetrees* left a comment
(rust-lang/compiler-builtins#812)
<#812 (comment)>
- This will currently always get configured out currently as the arm
module is cfg(target_arch = "arm") (which is 32-bit ARM):
https://github.com/rust-lang/compiler-builtins/blob/1901c415975eae741b7b072e789e74c6e422c22a/compiler-builtins/src/lib.rs#L50-L51
whereas the new assembly is only enabled when cfg(target_arch =
"arm64ec").
- The assembly from ***@***.***
<llvm/llvm-project@946a81f> is for 32-bit
ARM, whereas arm64ec is a 64-bit platform (LLVM's 64-bit ARM assembly
can be found here
<https://github.com/llvm/llvm-project/blob/f0bdeb4b6aa1ee0653aed8323a5a7485fb930a05/compiler-rt/lib/builtins/aarch64/chkstk.S>).
compiler-builtins already has the 64-bit ARM version of the assembly
in the aarch64 module
<https://github.com/rust-lang/compiler-builtins/blob/master/compiler-builtins/src/aarch64.rs>,
although it is currently cfg(target_os = "uefi").
- According to Understanding Arm64EC ABI and assembly code
<https://learn.microsoft.com/en-us/windows/arm/arm64ec-abi>, the
__chkstk function for Arm64EC code is called __chkstk_arm64ec.
—
Reply to this email directly, view it on GitHub
<#812 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGJPV632FRDEU7IT6WA3CT2YOETFAVCNFSM6AAAAAB2UWP2J6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBVG4YDKOJZGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Could you clarify whether this is attempting to solve a problem you have experienced (e.g. linker error) or just adding an implementation that is missing? We don't really want to add these implementations if Rust never emits them, but it's possible that is happening in circumstances we aren't yet testing. If it's possible to create a linker error looking for these symbols then we can add them, but otherwise we could skip it and just update README to mention these in the "Unimplemented functions" section. |
This is my first PR so I tried one that did not looked overly complicated.
This is base on llvm/llvm-project@946a81f
As this is my first PR fill free to fire all mistake you can spot :)
I am also not sure for the
#[cfg]
gate I put.