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
21 changes: 20 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@ jobs:
fail-fast: false
matrix:
rust_toolchain: [nightly, stable, 1.63.0]
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest, windows-latest, macOS-latest, windows-11-arm]
mode: ["--release", "-Zminimal-versions", ""]
manifest: ["psm/Cargo.toml", "Cargo.toml"]
exclude:
- rust_toolchain: stable
mode: -Zminimal-versions
- rust_toolchain: 1.63.0
mode: -Zminimal-versions
include:
- os: windows-latest
extra_target: i686-pc-windows-msvc
- os: windows-11-arm
rust_toolchain: nightly
extra_target: arm64ec-pc-windows-msvc
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
Expand All @@ -36,6 +42,7 @@ jobs:
toolchain: ${{ matrix.rust_toolchain }}
profile: minimal
default: true
target: ${{ matrix.extra_target }}
- name: Test ${{ matrix.manifest}} with ${{ matrix.mode }}
uses: actions-rs/cargo@v1
with:
Expand All @@ -46,6 +53,18 @@ jobs:
with:
command: test
args: --manifest-path=${{ matrix.manifest }} ${{ matrix.mode }} --examples -- --nocapture
- if: ${{ matrix.extra_target }}
name: Test ${{ matrix.manifest}} with ${{ matrix.mode }} as ${{ matrix.extra_target }}
uses: actions-rs/cargo@v1
with:
command: test
args: --target=${{ matrix.extra_target }} --manifest-path=${{ matrix.manifest }} ${{ matrix.mode }} -- --nocapture
- if: ${{ matrix.extra_target }}
name: Test ${{ matrix.manifest}} examples with ${{ matrix.mode }} as ${{ matrix.extra_target }}
uses: actions-rs/cargo@v1
with:
command: test
args: --target=${{ matrix.extra_target }} --manifest-path=${{ matrix.manifest }} ${{ matrix.mode }} --examples -- --nocapture

clang-cl-test:
name: Test ${{ matrix.manifest }} on ${{ matrix.rust_target }} with ${{ matrix.clang_cl }}
Expand Down
14 changes: 11 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stacker"
version = "0.1.21"
version = "0.1.22"
edition = "2021"
rust-version = "1.63"
authors = ["Alex Crichton <[email protected]>", "Simonas Kazlauskas <[email protected]>"]
Expand All @@ -25,14 +25,22 @@ cfg-if = "1.0.0"
libc = "0.2.156"
psm = { path = "psm", version = "0.1.7" }

[target.'cfg(windows)'.dependencies.windows-sys]
[target.'cfg(all(windows, not(target_arch = "arm64ec")))'.dependencies.windows-sys]
version = ">=0.52.0, <0.60.0"
features = [
"Win32_System_Memory",
"Win32_System_Threading",
"Win32_Foundation",
]

[target.arm64ec-pc-windows-msvc.dependencies.windows-sys]
version = ">=0.59.0, <0.60.0"
features = [
"Win32_System_Memory",
"Win32_System_Threading",
"Win32_Foundation",
]

Comment on lines +28 to +43
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not bump windows-sys dep accordingly for all windows targets?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with doing that, although I think that will be a semver breaking change. Let me know if that's what you prefer.


[build-dependencies]
cc = "1.1.22"
cc = "1.2.33"
2 changes: 1 addition & 1 deletion psm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ readme = "README.mkd"
[dependencies]

[build-dependencies]
cc = "1.1.22"
cc = "1.2.33"
1 change: 1 addition & 0 deletions psm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fn find_assembly(
Some(("src/arch/x86_64_windows_gnu.s", false))
}
("arm", _, "windows", "msvc") => Some(("src/arch/arm_armasm.asm", false)),
("arm64ec", _, "windows", "msvc") => Some(("src/arch/arm64ec_armasm.asm", false)),
("aarch64", _, "windows", _) => {
if masm {
Some(("src/arch/aarch64_armasm.asm", false))
Expand Down
38 changes: 38 additions & 0 deletions psm/src/arch/arm64ec_armasm.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
AREA |.text|, CODE, READONLY

GLOBAL |#rust_psm_stack_direction|
ALIGN 4
|#rust_psm_stack_direction| PROC
orr w0, wzr, #2
ret
ENDP


GLOBAL |#rust_psm_stack_pointer|
ALIGN 4
|#rust_psm_stack_pointer| PROC
mov x0, sp
ret
ENDP


GLOBAL |#rust_psm_replace_stack|
ALIGN 4
|#rust_psm_replace_stack| PROC
mov sp, x2
br x1
ENDP

GLOBAL |#rust_psm_on_stack|
ALIGN 4
|#rust_psm_on_stack| PROC
stp x29, x30, [sp, #-16]!
mov x29, sp
mov sp, x3
blr x2
mov sp, x29
ldp x29, x30, [sp], #16
ret
ENDP

END
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between this target and the aarch64-*-windows-*? The assembly looks identical and could use aarch64_armasm.asm, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Difference is the name of the functions: Arm64EC requires that functions are prefixed with #

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😭

Loading