Skip to content

Conversation

@janvorli
Copy link
Member

@janvorli janvorli commented Oct 23, 2025

The interpreter call stubs were missing support for HFA 128 bit and 32 bit args passing. That was causing a lot of failures in the HardwareIntrinsics coreclr tests on macOS arm64.

With this change, the results basically match the x64 Windows.

The interpreter call stubs were missing support for HFA 128 bit args
passing. That was causing a lot of failures in the HardwareIntrinsics
coreclr tests on macOS arm64.

With this change, the results basically match the x64 Windows.
@janvorli janvorli added this to the 11.0.0 milestone Oct 23, 2025
@janvorli janvorli self-assigned this Oct 23, 2025
@Copilot Copilot AI review requested due to automatic review settings October 23, 2025 20:26
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for passing 128-bit homogeneous floating-point aggregate (HFA) arguments in Q registers on ARM64, which was previously missing from the interpreter call stubs. This change resolves failures in HardwareIntrinsics CoreCLR tests on macOS ARM64 by enabling proper handling of Vector128 types passed as function arguments.

Key Changes:

  • Added new FPReg128 routine type to handle 128-bit floating-point register arguments
  • Implemented Q register load/store routines in ARM64 assembly (both MASM and GAS syntax)
  • Enhanced argument processing logic to detect and route 128-bit HFA arguments appropriately

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/coreclr/vm/callstubgenerator.h Moved RoutineType enum earlier in class definition and added FPReg128 type along with tracking field and method declarations
src/coreclr/vm/callstubgenerator.cpp Added Q register routine tables, implemented GetFPReg128RangeRoutine(), and updated argument processing to handle 128-bit float arguments
src/coreclr/vm/arm64/asmhelpers.asm Added ARM64 MASM assembly routines for loading/storing Q registers (128-bit SIMD registers)
src/coreclr/vm/arm64/asmhelpers.S Added ARM64 GAS assembly routines for loading/storing Q registers (128-bit SIMD registers)

@janvorli janvorli requested a review from kg October 23, 2025 20:27
@janvorli janvorli changed the title Add support for passing 128 bit args to call stubs on arm64 Add support for passing 128 and 32 bit HFA args to call stubs on arm64 Oct 24, 2025
@janvorli janvorli merged commit 9983c03 into dotnet:main Oct 24, 2025
98 checks passed
@janvorli janvorli deleted the fix-interpreter-passing-128bit-args-on-arm64 branch October 24, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants