Skip to content

Commit

Permalink
Fix calculation in PREPARE_EXTERNAL_VAR[_INDIRECT] (#100117)
Browse files Browse the repository at this point in the history
* Fix calculation in PREPARE_EXTERNAL_VAR[_INDIRECT]

* Work around compiler-asserting tests

---------

Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
  • Loading branch information
filipnavara and MichalStrehovsky authored Mar 22, 2024
1 parent c68c2e6 commit 3cf7759
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ C_FUNC(\Name):

.macro PREPARE_EXTERNAL_VAR Name, HelperReg
movw \HelperReg, #:lower16:C_FUNC(\Name) - (. + 12)
movt \HelperReg, #:upper16:C_FUNC(\Name) - (. + 12)
movt \HelperReg, #:upper16:C_FUNC(\Name) - (. + 8)
add \HelperReg, pc
.endm

.macro PREPARE_EXTERNAL_VAR_INDIRECT Name, HelperReg
movw \HelperReg, #:lower16:C_FUNC(\Name) - (. + 12)
movt \HelperReg, #:upper16:C_FUNC(\Name) - (. + 12)
movt \HelperReg, #:upper16:C_FUNC(\Name) - (. + 8)
add \HelperReg, pc
ldr \HelperReg, [\HelperReg]
.endm
Expand Down
3 changes: 3 additions & 0 deletions src/tests/JIT/Stress/ABI/pinvokes_d.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<JitOptimizationSensitive>true</JitOptimizationSensitive>
<GCStressIncompatible>true</GCStressIncompatible>

<!-- https://github.com/dotnet/runtime/issues/100125 -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>Full</DebugType>
Expand Down
3 changes: 3 additions & 0 deletions src/tests/JIT/Stress/ABI/pinvokes_do.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<JitOptimizationSensitive>true</JitOptimizationSensitive>
<GCStressIncompatible>true</GCStressIncompatible>

<!-- https://github.com/dotnet/runtime/issues/100125 -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>Full</DebugType>
Expand Down
3 changes: 3 additions & 0 deletions src/tests/JIT/Stress/ABI/stubs_do.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<JitOptimizationSensitive>true</JitOptimizationSensitive>
<GCStressIncompatible>true</GCStressIncompatible>

<!-- https://github.com/dotnet/runtime/issues/100125 -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>Full</DebugType>
Expand Down
3 changes: 3 additions & 0 deletions src/tests/JIT/Stress/ABI/tailcalls_d.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<JitOptimizationSensitive>true</JitOptimizationSensitive>
<GCStressIncompatible>true</GCStressIncompatible>

<!-- https://github.com/dotnet/runtime/issues/100125 -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>Full</DebugType>
Expand Down
3 changes: 3 additions & 0 deletions src/tests/JIT/Stress/ABI/tailcalls_do.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<JitOptimizationSensitive>true</JitOptimizationSensitive>
<GCStressIncompatible>true</GCStressIncompatible>

<!-- https://github.com/dotnet/runtime/issues/100125 -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>Full</DebugType>
Expand Down

0 comments on commit 3cf7759

Please sign in to comment.