intel/elk: Fix undefined left shift of large UW value in elk_imm_uw

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30333>
This commit is contained in:
Ian Romanick
2024-07-22 19:26:44 -07:00
parent 0e5ac7d6b0
commit f3f4a057b9

View File

@@ -727,7 +727,7 @@ static inline struct elk_reg
elk_imm_uw(uint16_t uw)
{
struct elk_reg imm = elk_imm_reg(ELK_REGISTER_TYPE_UW);
imm.ud = uw | (uw << 16);
imm.ud = uw | ((uint32_t)uw << 16);
return imm;
}