-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Check HFA alignment for valuetype fields #106099
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
abd59fd
Check HFA alignment for valuetype fields
kg 0dd0b1a
Attempt to add test for Issue 80393
kg addbcdb
Make test more 'real'
kg 3781870
Clarifying comments
kg 5c39f85
Possible fix
kg 496b12a
Add rough documentation on how to run arm32 tests
kg 12d42c5
Fix C side of HFA test
kg aeb43d4
Update docs page
kg fca188f
Address PR feedback
kg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Running ARM32 tests on modern hardware | ||
|
||
One of our supported targets is 32-bit ARM. It can be quite challenging to construct a realistic ARM32 environment where you can build or run tests in a reasonable amount of time. Thankfully, it's possible to configure an ARM64 linux environment so that you can cross-build from ARM64 to ARM32, and run tests there using native hardware support instead of software emulation. This is not possible on ARM64-based Windows (this functionality is not offered by the OS). | ||
kg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Configuring your ARM64 environment to run ARM32 binaries | ||
|
||
By default your ARM64 Linux install probably doesn't have support for ARM32 binaries enabled, which will cause running the binaries to fail with a cryptic error. So you'll need to add the architecture to dpkg and install some core userspace libraries that CoreCLR will need to actually run your tests, which on Debian or Ubuntu will look like: | ||
|
||
```bash | ||
kg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
$ sudo dpkg --add-architecture armhf | ||
|
||
$ sudo apt-get update | ||
Reading package lists... Done | ||
|
||
$ sudo apt-get install libc6:armhf libstdc++6:armhf libicu74:armhf | ||
The following additional packages will be installed: | ||
``` | ||
|
||
Note that when installing a package for another architecture, you need to suffix the package name with the architecture name. For me, the three packages above were sufficient to run an ARM32 JIT test. | ||
|
||
## Cross-building for ARM32 on ARM64 | ||
|
||
Follow the steps from https://github.com/dotnet/runtime/blob/main/docs/workflow/building/coreclr/cross-building.md#linux-cross-building as-is. You should end up with a `linux.arm` `Core_Root` and test artifacts. | ||
|
||
## Running an ARM32 test in your ARM64 environment | ||
|
||
We're finally ready to go, probably. Export an environment variable to point to your ARM32 core root, and then run your test, i.e.: | ||
|
||
```bash | ||
$ export CORE_ROOT=/home/kg/runtime/artifacts/tests/coreclr/linux.arm.Release/Tests/Core_Root/ | ||
|
||
$ bash artifacts/tests/coreclr/linux.arm.Release/JIT/Directed/StructABI/StructABI/StructABI.sh | ||
BEGIN EXECUTION | ||
/home/kg/runtime/artifacts/tests/coreclr/linux.arm.Release/Tests/Core_Root//corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true StructABI.dll '' | ||
Issue80393_HFA failed. Retval: f1=1 f3=3 | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.