-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Use half-fences for volatile loads/stores on Windows ARM64 #27384
Conversation
In particular the perf sensitive part of Before: 00000001`800f0c6c 9b0831c8 madd x8, x14, x8, x12
00000001`800f0c70 9100a10a add x10, x8, #0x28
00000001`800f0c74 b9400149 ldr w9, [x10]
00000001`800f0c78 d5033fbf dmb sy <---
00000001`800f0c7c f9400548 ldr x8, [x10, #8]
00000001`800f0c80 eb00011f cmp x8, x0
00000001`800f0c84 540000c1 bne coreclr!CastCache::TryGet+0x64 (00000001`800f0c9c)
00000001`800f0c88 f9400948 ldr x8, [x10, #0x10]
00000001`800f0c8c d5033fbf dmb sy <---
00000001`800f0c90 ca01010b eor x11, x8, x1
00000001`800f0c94 f100057f cmp x11, #1 After: 00000001`800f0674 9b0831e8 madd x8, x15, x8, x12
00000001`800f0678 9100a10b add x11, x8, #0x28
00000001`800f067c 88dffd6a ldar w10, [x11] <---
00000001`800f0680 f9400568 ldr x8, [x11, #8]
00000001`800f0684 eb00011f cmp x8, x0
00000001`800f0688 540000c1 bne coreclr!CastCache::TryGet+0x60 (00000001`800f06a0)
00000001`800f068c 91004168 add x8, x11, #0x10
00000001`800f0690 c8dffd09 ldar x9, [x8] <---
00000001`800f0694 ca01012d eor x13, x9, x1
00000001`800f0698 f10005bf cmp x13, #1 |
|
Build machine uses VS2017 ? |
https://github.com/dotnet/coreclr/issues/11545 Is related. However this is not about JIT-ed code. This tweaks c++ Volatile helpers when MSVC is used. |
Possibly related #11885 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if you can fix to compilation issues.
Yes, we are using VS2017 in the build.
|
Should this also be replicated in GC's copy of volatile.h under src\gc\env? |
Our build instructions require VS2019. https://github.com/dotnet/coreclr/blob/master/Documentation/building/windows-instructions.md Why the lab uses 2017? How can this be fixed? |
/cc @jashook |
Yes. gc\env\volatile.h also needs updating. I did not realize it is a copy. Thanks! |
There was a problem with optimizations in VS2019 breaking our explicit frames stuff during EH. Release builds would crash when exception was thrown from some places in the runtime. While I've fixed that some time ago, @jkotas has discovered there is still an issue that needs to be fixed before we can migrate our builds to VS2019 (#27247). |
This issue should not be blocking upgrade to VS2019. |
You are right, the issue now exists with both VS2019 and 2017. |
unified on type names and warning suppression.
/azp run coreclr-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
outerloop tests passed on Windows ARM64. |
Thanks!! |
@VSadov You state here,
However, the CI system currently does not run any tests on Windows arm64. If you look at the jobs, the important "Send tests to Helix" step is skipped for the two Windows arm64 Pri1 test runs. So it seems this change got zero testing in the CI. |
I thought we skip running in inner loop, but that outer loop does some running on Win-arm64 |
Also the changes make windows to use the same fences in Volatile as was used on Unix for a while. |
Oh, I see it is the type switch that could turn float into int. Now, if we do a fix - how can we have any CI coverage for the fix? |
There is currently no support for any Windows arm64 testing in the CI today. Talk to @jashook about when we might get some... hopefully soon. |
@VSadov for your change only please remove the skip for helix testing on arm64 |
…reclr#27384) * Use half-fences for volatile load/stores on Windows ARM64 * Updated Volatile.h in gc/env as well. unified on type names and warning suppression. Commit migrated from dotnet/coreclr@c128dba
…reclr#27384) * Use half-fences for volatile load/stores on Windows ARM64 * Updated Volatile.h in gc/env as well. unified on type names and warning suppression. Commit migrated from dotnet/coreclr@c128dba
…reclr#27384) * Use half-fences for volatile load/stores on Windows ARM64 * Updated Volatile.h in gc/env as well. unified on type names and warning suppression. Commit migrated from dotnet/coreclr@c128dba
Needed for #23548