Skip to content

Commit

Permalink
Fix RhpLockCmpXchg64 FCall on win-x86
Browse files Browse the repository at this point in the history
  • Loading branch information
filipnavara committed Mar 22, 2024
1 parent 01cfe6f commit 67533a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/coreclr/nativeaot/Runtime/CommonMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ typedef uint8_t CODE_LOCATION;
FCIMPL_RENAME_ARGSIZE(_rettype, _method, 24) \
EXTERN_C _rettype F_CALL_CONV _method##_FCall (c, b, a) \
{
#define FCIMPL3_ILL(_rettype, _method, a, b, c) \
FCIMPL_RENAME_ARGSIZE(_rettype, _method, 20) \
EXTERN_C _rettype F_CALL_CONV _method##_FCall (a, c, b) \
{

#else

Expand Down Expand Up @@ -289,6 +293,9 @@ typedef uint8_t CODE_LOCATION;
#define FCIMPL3_DDD(_rettype, _method, a, b, c) \
EXTERN_C _rettype F_CALL_CONV _method (a, b, c) \
{
#define FCIMPL3_ILL(_rettype, _method, a, b, c) \
EXTERN_C _rettype F_CALL_CONV _method (a, b, c) \
{

#endif

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/nativeaot/Runtime/MiscHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ FCIMPL3(int32_t, RhpLockCmpXchg32, int32_t * location, int32_t value, int32_t co
}
FCIMPLEND

FCIMPL3(int64_t, RhpLockCmpXchg64, int64_t * location, int64_t value, int64_t comparand)
FCIMPL3_ILL(int64_t, RhpLockCmpXchg64, int64_t * location, int64_t value, int64_t comparand)
{
return PalInterlockedCompareExchange64(location, value, comparand);
}
Expand Down

0 comments on commit 67533a1

Please sign in to comment.