Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions psm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,28 @@ fn find_assembly(
// is not supported in Windows. For x86_64 the implementation actually works locally,
// but failed tests in CI (???). Might want to have a feature for experimental support
// here.
("x86", _, "windows", "msvc") => {
("x86", _, "windows", _) => {
if masm {
Some(("src/arch/x86_msvc.asm", false))
} else {
Some(("src/arch/x86_windows_gnu.s", false))
}
}
("x86_64", _, "windows", "msvc") => {
("x86_64", _, "windows", _) => {
if masm {
Some(("src/arch/x86_64_msvc.asm", false))
} else {
Some(("src/arch/x86_64_windows_gnu.s", false))
}
}
("arm", _, "windows", "msvc") => Some(("src/arch/arm_armasm.asm", false)),
("aarch64", _, "windows", "msvc") => {
("aarch64", _, "windows", _) => {
if masm {
Some(("src/arch/aarch64_armasm.asm", false))
} else {
Some(("src/arch/aarch_aapcs64.s", false))
}
}
("x86", _, "windows", _) => Some(("src/arch/x86_windows_gnu.s", false)),
("x86_64", _, "windows", _) => Some(("src/arch/x86_64_windows_gnu.s", false)),
("x86", _, _, _) => Some(("src/arch/x86.s", true)),
("x86_64", _, _, _) => Some(("src/arch/x86_64.s", true)),
("arm", _, _, _) => Some(("src/arch/arm_aapcs.s", true)),
Expand Down
7 changes: 7 additions & 0 deletions psm/src/arch/aarch_aapcs64.s
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
#define FUNCTION(fnname) _##fnname
#define SIZE(fnname,endlabel)

#elif CFG_TARGET_OS_windows

#define GLOBL(fnname) .globl fnname
#define TYPE(fnname)
#define FUNCTION(fnname) fnname
#define SIZE(fnname,endlabel)

#else

#define GLOBL(fnname) .globl fnname
Expand Down
2 changes: 1 addition & 1 deletion psm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ macro_rules! extern_item {
// NB: this could be nicer across multiple blocks but we cannot do it because of
// https://github.com/rust-lang/rust/issues/65847
extern_item! { {
#![link(name="psm_s")]
#![cfg_attr(asm, link(name="psm_s"))]

#[cfg(asm)]
fn rust_psm_stack_direction() -> u8;
Expand Down