Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: src/IceUtils.h

Issue 1127963004: Subzero ARM: lowerArguments (GPR), basic legalize(), and lowerRet(i32, i64). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: fix warnings, etc Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | tests_lit/llvm2ice_tests/int-arg.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceUtils.h
diff --git a/src/IceUtils.h b/src/IceUtils.h
index bcbba23eeab4bc441d63e616fd5cd7ee54bc528b..cf0be63364f2eb1052073c9c501fec60d538881e 100644
--- a/src/IceUtils.h
+++ b/src/IceUtils.h
@@ -78,6 +78,19 @@ public:
return 0;
return Align - Mod;
}
+
+ // Precondition: 0 <= shift < 32
+ static inline uint32_t rotateLeft32(uint32_t value, uint32_t shift) {
+ if (shift == 0)
+ return value;
+ return (value << shift) | (value >> (32 - shift));
+ }
+
+ static inline uint32_t rotateRight32(uint32_t value, uint32_t shift) {
+ if (shift == 0)
+ return value;
+ return (value >> shift) | (value << (32 - shift));
+ }
};
} // end of namespace Ice
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | tests_lit/llvm2ice_tests/int-arg.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698