diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2017-01-05 02:37:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-05 02:37:25 +0100 |
commit | d2daeccabf5c64c67a080928fc48a4d18d0464f9 (patch) | |
tree | d14dafe47308f6ae81c624dadf42676449aa24a6 /src/jit | |
parent | d200352c3567f77020e3eb36706fa9484bd30bf6 (diff) | |
download | coreclr-d2daeccabf5c64c67a080928fc48a4d18d0464f9.tar.gz coreclr-d2daeccabf5c64c67a080928fc48a4d18d0464f9.tar.bz2 coreclr-d2daeccabf5c64c67a080928fc48a4d18d0464f9.zip |
Fix unsigned_abs function on Unix (#8805)
The unsigned_abs function in jit.h is implemented using labs function.
However labs has 32 bit argument / result, while the unsigned_abs expects
it to be 64 bit.
The correct function to use for FEATURE_PAL is llabs. But since we now have
abs overload for __int64 in pal.h, we can just remove the #ifdef for FEATURE_PAL
and use the same implementation for both Unix and Windows.
Diffstat (limited to 'src/jit')
-rw-r--r-- | src/jit/jit.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/jit/jit.h b/src/jit/jit.h index 220294f825..c485ff0bea 100644 --- a/src/jit/jit.h +++ b/src/jit/jit.h @@ -699,11 +699,7 @@ inline unsigned int unsigned_abs(int x) #ifdef _TARGET_64BIT_ inline size_t unsigned_abs(ssize_t x) { -#ifndef FEATURE_PAL return ((size_t)abs(x)); -#else // !FEATURE_PAL - return ((size_t)labs(x)); -#endif // !FEATURE_PAL } #endif // _TARGET_64BIT_ |