projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d9c822
)
Add roundUp(unsigned size, unsigned mult) and roundDn(unsigned size, unsigned mult...
author
Egor Chesakov
<Egor.Chesakov@microsoft.com>
Mon, 20 Aug 2018 20:18:08 +0000
(13:18 -0700)
committer
Egor Chesakov
<Egor.Chesakov@microsoft.com>
Tue, 21 Aug 2018 17:56:36 +0000
(10:56 -0700)
src/jit/jit.h
patch
|
blob
|
history
diff --git
a/src/jit/jit.h
b/src/jit/jit.h
index f09b31d49d47d066a6fd88024eae6badd0a8cc6d..3c2ee489770d24ef07a428e243c9f4ff266a7269 100644
(file)
--- a/
src/jit/jit.h
+++ b/
src/jit/jit.h
@@
-687,6
+687,18
@@
inline size_t roundDn(size_t size, size_t mult = sizeof(size_t))
return (size) & ~(mult - 1);
}
+#ifdef _HOST_64BIT_
+inline unsigned int roundUp(unsigned size, unsigned mult)
+{
+ return (unsigned int)roundUp((size_t)size, (size_t)mult);
+}
+
+inline unsigned int roundDn(unsigned size, unsigned mult)
+{
+ return (unsigned int)roundDn((size_t)size, (size_t)mult);
+}
+#endif // _HOST_64BIT_
+
inline unsigned int unsigned_abs(int x)
{
return ((unsigned int)abs(x));