Fix IF_SEXT(val, 32). The constants need to have type long to
handle size > 16.
This commit is contained in:
parent
6f98452b38
commit
20409ddf22
@ -148,7 +148,8 @@
|
||||
|
||||
/* Sign-extend a field of width W */
|
||||
#define IF_SEXT(x, w) \
|
||||
(((x) & (1 << ((w) - 1))) != 0 ? (-1L - ((x) ^ ((1 << (w)) - 1))) : (x))
|
||||
(((x) & (1L << ((w) - 1))) != 0 ? \
|
||||
(-1L - ((x) ^ ((1L << (w)) - 1))) : (x))
|
||||
|
||||
#if 0
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user