@@ -646,6 +646,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr
646
646
// Normal moves between vars
647
647
case INTOP_MOV_4: MOV (int32_t , int32_t ); break ;
648
648
case INTOP_MOV_8: MOV (int64_t , int64_t ); break ;
649
+ #undef MOV
649
650
650
651
case INTOP_MOV_VT:
651
652
memmove (stack + ip[1 ], stack + ip[2 ], ip[3 ]);
@@ -1016,6 +1017,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr
1016
1017
case INTOP_BRTRUE_I8:
1017
1018
BR_UNOP (int64_t , != 0 );
1018
1019
break ;
1020
+ #undef BR_UNOP
1019
1021
1020
1022
#define BR_BINOP_COND (cond ) \
1021
1023
if (cond) \
@@ -1226,6 +1228,8 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr
1226
1228
BR_BINOP_COND (isunordered (d1, d2) || d1 < d2);
1227
1229
break ;
1228
1230
}
1231
+ #undef BR_BINOP_COND
1232
+ #undef BR_BINOP
1229
1233
1230
1234
case INTOP_ADD_I4:
1231
1235
LOCAL_VAR (ip[1 ], int32_t ) = LOCAL_VAR (ip[2 ], int32_t ) + LOCAL_VAR (ip[3 ], int32_t );
@@ -1682,6 +1686,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr
1682
1686
case INTOP_CLT_UN_R8:
1683
1687
CMP_BINOP_FP (double , <, 1 );
1684
1688
break ;
1689
+ #undef CMP_BINOP_FP
1685
1690
1686
1691
#define LDIND (dtype, ftype ) \
1687
1692
do { \
@@ -1715,6 +1720,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr
1715
1720
case INTOP_LDIND_R8:
1716
1721
LDIND (double , double );
1717
1722
break ;
1723
+ #undef LDIND
1718
1724
case INTOP_LDIND_VT:
1719
1725
{
1720
1726
char *src = LOCAL_VAR (ip[2 ], char *);
@@ -1757,6 +1763,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr
1757
1763
case INTOP_STIND_R8:
1758
1764
STIND (double , double );
1759
1765
break ;
1766
+ #undef STIND
1760
1767
case INTOP_STIND_O:
1761
1768
{
1762
1769
char *dst = LOCAL_VAR (ip[1 ], char *);
@@ -2361,6 +2368,7 @@ do { \
2361
2368
LDELEM (double , double );
2362
2369
break ;
2363
2370
}
2371
+ #undef LDELEM
2364
2372
case INTOP_LDELEM_REF:
2365
2373
{
2366
2374
BASEARRAYREF arrayRef = LOCAL_VAR (ip[2 ], BASEARRAYREF);
@@ -2457,6 +2465,7 @@ do { \
2457
2465
STELEM (double , double );
2458
2466
break ;
2459
2467
}
2468
+ #undef STELEM
2460
2469
case INTOP_STELEM_REF:
2461
2470
{
2462
2471
BASEARRAYREF arrayRef = LOCAL_VAR (ip[1 ], BASEARRAYREF);
@@ -2635,6 +2644,31 @@ do \
2635
2644
COMPARE_EXCHANGE (int64_t );
2636
2645
break ;
2637
2646
}
2647
+ #undef COMPARE_EXCHANGE
2648
+
2649
+ #define EXCHANGE (type ) \
2650
+ do \
2651
+ { \
2652
+ type* dst = LOCAL_VAR (ip[2 ], type*); \
2653
+ NULL_CHECK (dst); \
2654
+ type newValue = LOCAL_VAR (ip[3 ], type); \
2655
+ type old = InterlockedExchangeT (dst, newValue); \
2656
+ LOCAL_VAR (ip[1 ], type) = old; \
2657
+ ip += 4 ; \
2658
+ } while (0 )
2659
+
2660
+ case INTOP_EXCHANGE_I4:
2661
+ {
2662
+ EXCHANGE (int32_t );
2663
+ break ;
2664
+ }
2665
+
2666
+ case INTOP_EXCHANGE_I8:
2667
+ {
2668
+ EXCHANGE (int64_t );
2669
+ break ;
2670
+ }
2671
+ #undef EXCHANGE
2638
2672
2639
2673
case INTOP_CALL_FINALLY:
2640
2674
{
0 commit comments