Skip to content

Fixed build configs and invoke for windows arm64#4909

Open
joevdh wants to merge 1 commit intobytecodealliance:mainfrom
joevdh:WindowsOnArm
Open

Fixed build configs and invoke for windows arm64#4909
joevdh wants to merge 1 commit intobytecodealliance:mainfrom
joevdh:WindowsOnArm

Conversation

@joevdh
Copy link
Copy Markdown

@joevdh joevdh commented Apr 8, 2026

  • Updated cmake build process to detect windows arm configuration, and use the marmasm assembler.
  • Fixed the windows arm64 assembly to load the parameters correctly when invoking functions
  • Note: AI assisted

Copy link
Copy Markdown
Contributor

@lum1n0us lum1n0us left a comment

Choose a reason for hiding this comment

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

The PR fixes invokeNative_armasm64.asm but does not modify invokeNative_armasm64_simd.asm.

Looking at iwasm_common.cmake, the SIMD version follows the same Windows ARM64 path:

  else()          
      # SIMD version                                                                                                                                                             
      if (WAMR_BUILD_PLATFORM STREQUAL "windows")                                                                                                                                
        if (MSVC)                                                                                                                                                                
          set (source_all ${c_source_all} ${IWASM_COMMON_DIR}/arch/invokeNative_armasm64_simd.asm)                                                                               

Both files likely share the same calling convention issue. Should invokeNative_armasm64_simd.asm be updated with the same register loading fixes (removing d4-d7, correcting
parameter indices)?

include_directories (${IWASM_COMMON_DIR})
if (MSVC AND WAMR_BUILD_PLATFORM STREQUAL "windows" AND WAMR_BUILD_TARGET MATCHES "AARCH64.*")
if (DEFINED ENV{VCToolsInstallDir})
if (MSVC AND WAMR_BUILD_PLATFORM STREQUAL "windows" AND WAMR_BUILD_TARGET MATCHES "AARCH64.*" AND NOT WAMR_BUILD_WAMR_COMPILER)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What specific build issue does skipping WAMR_BUILD_WAMR_COMPILER solve? The wamr-compiler also needs to compile for Windows ARM64, so it's not clear why this
scenario should be excluded from the ARM64 assembly settings. Could you provide more context on this?

if (MSVC AND WAMR_BUILD_PLATFORM STREQUAL "windows" AND WAMR_BUILD_TARGET MATCHES "AARCH64.*")
if (DEFINED ENV{VCToolsInstallDir})
if (MSVC AND WAMR_BUILD_PLATFORM STREQUAL "windows" AND WAMR_BUILD_TARGET MATCHES "AARCH64.*" AND NOT WAMR_BUILD_WAMR_COMPILER)
if (CMAKE_ASM_MARMASM_COMPILER)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Concern: CMAKE_ASM_MARMASM_COMPILER appears to be a newer CMake feature. Could you confirm:

  • Which CMake version introduced this variable?
  • The project currently requires CMake 3.14 minimum - is this compatible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants