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

Unified Diff: src/ppc/macro-assembler-ppc.h

Issue 1177263002: PPC: smi test optimization (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/macro-assembler-ppc.h
diff --git a/src/ppc/macro-assembler-ppc.h b/src/ppc/macro-assembler-ppc.h
index 491167b227d531009629d7fb4a7d44ad3b6a238c..019ca2217cb072d86137dfd5c690fd80502022c2 100644
--- a/src/ppc/macro-assembler-ppc.h
+++ b/src/ppc/macro-assembler-ppc.h
@@ -1063,11 +1063,16 @@ class MacroAssembler : public Assembler {
DCHECK(rangeStart >= rangeEnd && rangeStart < kBitsPerPointer);
int rotate = (rangeEnd == 0) ? 0 : kBitsPerPointer - rangeEnd;
int width = rangeStart - rangeEnd + 1;
+ if (rc == SetRC && rangeEnd == 0 && width <= 16) {
+ andi(dst, src, Operand((1 << width) - 1));
+ } else {
#if V8_TARGET_ARCH_PPC64
- rldicl(dst, src, rotate, kBitsPerPointer - width, rc);
+ rldicl(dst, src, rotate, kBitsPerPointer - width, rc);
#else
- rlwinm(dst, src, rotate, kBitsPerPointer - width, kBitsPerPointer - 1, rc);
+ rlwinm(dst, src, rotate, kBitsPerPointer - width, kBitsPerPointer - 1,
+ rc);
#endif
+ }
}
inline void ExtractBit(Register dst, Register src, uint32_t bitNumber,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698