diff --git a/ps2xRuntime/include/ps2_runtime_macros.h b/ps2xRuntime/include/ps2_runtime_macros.h index f7b3316..0f19c9f 100644 --- a/ps2xRuntime/include/ps2_runtime_macros.h +++ b/ps2xRuntime/include/ps2_runtime_macros.h @@ -758,6 +758,17 @@ static inline void Ps2SetGprLow64(R5900Context *ctx, int reg, __m128i new_low) } \ } while (0) + +#define SET_GPR_ZE32(ctx_ptr, reg_idx, val) \ + do \ + { \ + if ((reg_idx) != 0) \ + { \ + __m128i _newVal = _mm_cvtsi64_si128((int64_t)(uint32_t)(val)); \ + Ps2SetGprLow64(ctx_ptr, reg_idx, _newVal); \ + } \ + } while (0) + #define SET_GPR_S32(ctx_ptr, reg_idx, val) \ do \ { \