Skip to content

Commit 7005f46

Browse files
authored
Fix RhpLockCmpXchg64 FCall on win-x86 (#100155)
1 parent 80d37dd commit 7005f46

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/coreclr/nativeaot/Runtime/CommonMacros.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ typedef uint8_t CODE_LOCATION;
255255
FCIMPL_RENAME_ARGSIZE(_rettype, _method, 24) \
256256
EXTERN_C _rettype F_CALL_CONV _method##_FCall (c, b, a) \
257257
{
258+
#define FCIMPL3_ILL(_rettype, _method, a, b, c) \
259+
FCIMPL_RENAME_ARGSIZE(_rettype, _method, 20) \
260+
EXTERN_C _rettype F_CALL_CONV _method##_FCall (a, c, b) \
261+
{
258262

259263
#else
260264

@@ -289,6 +293,9 @@ typedef uint8_t CODE_LOCATION;
289293
#define FCIMPL3_DDD(_rettype, _method, a, b, c) \
290294
EXTERN_C _rettype F_CALL_CONV _method (a, b, c) \
291295
{
296+
#define FCIMPL3_ILL(_rettype, _method, a, b, c) \
297+
EXTERN_C _rettype F_CALL_CONV _method (a, b, c) \
298+
{
292299

293300
#endif
294301

src/coreclr/nativeaot/Runtime/MiscHelpers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ FCIMPL3(int32_t, RhpLockCmpXchg32, int32_t * location, int32_t value, int32_t co
423423
}
424424
FCIMPLEND
425425

426-
FCIMPL3(int64_t, RhpLockCmpXchg64, int64_t * location, int64_t value, int64_t comparand)
426+
FCIMPL3_ILL(int64_t, RhpLockCmpXchg64, int64_t * location, int64_t value, int64_t comparand)
427427
{
428428
return PalInterlockedCompareExchange64(location, value, comparand);
429429
}

0 commit comments

Comments
 (0)