mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
util: fix msvc build warning 4146 (unary minus operator applied to unsigned type, result still unsigned)
Reviewed-by: Sil Vilerino <sivileri@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34845>
This commit is contained in:
parent
0f4b022708
commit
fdc36dd54a
2 changed files with 6 additions and 2 deletions
|
|
@ -256,6 +256,10 @@ def native_to_constant(type, value):
|
|||
return "%.1ff" % float(value)
|
||||
else:
|
||||
return "%.1f" % float(value)
|
||||
elif value == -2147483648:
|
||||
return "INT_MIN"
|
||||
elif value == -9223372036854775808:
|
||||
return "INT64_MIN"
|
||||
else:
|
||||
return str(int(value))
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ uint64_t _mesa_short_shift_right_jam64(uint64_t a, uint8_t dist)
|
|||
* From softfloat_shiftRightJam64()
|
||||
*/
|
||||
static inline
|
||||
uint64_t _mesa_shift_right_jam64(uint64_t a, uint32_t dist)
|
||||
uint64_t _mesa_shift_right_jam64(uint64_t a, int32_t dist)
|
||||
{
|
||||
return
|
||||
(dist < 63) ? a >> dist | ((uint64_t) (a << (-dist & 63)) != 0) : (a != 0);
|
||||
|
|
@ -1339,7 +1339,7 @@ _mesa_float_fma_rtz(float a, float b, float c)
|
|||
}
|
||||
if (m_64 & 0x8000000000000000) {
|
||||
s = !s;
|
||||
m_64 = -m_64;
|
||||
m_64 = (uint64_t)(-(int64_t)m_64);
|
||||
}
|
||||
} else {
|
||||
m_64 -= _mesa_shift_right_jam64(c_flt_m_64, exp_diff);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue