mcf's improved rsval()
It is semantically the same but does not rely on implementation- defined behavior.
This commit is contained in:
parent
dc3f7d7c4a
commit
a2ad38086c
1 changed files with 1 additions and 1 deletions
2
all.h
2
all.h
|
@ -115,7 +115,7 @@ static inline int rtype(Ref r)
|
||||||
|
|
||||||
static inline int rsval(Ref r)
|
static inline int rsval(Ref r)
|
||||||
{
|
{
|
||||||
return (int32_t)((int64_t)r.val << 3) >> 3;
|
return ((int)r.val ^ 0x10000000) - 0x10000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum CmpI {
|
enum CmpI {
|
||||||
|
|
Loading…
Add table
Reference in a new issue