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

Unified Diff: src/ia32/code-stubs-ia32.cc

Issue 8834007: Tweak to shorten generated code in Math.pow. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 9 years 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 | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index d87a439007e6a1f89525dc72571094742e62f373..08bbbc036d638c065bb0c71585259644d579f435 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -3130,11 +3130,9 @@ void MathPowStub::Generate(MacroAssembler* masm) {
__ movsd(double_scratch2, double_result); // Load double_exponent with 1.
// Get absolute value of exponent.
- Label no_neg, while_true, no_multiply;
- __ cmp(exponent, 0);
- __ j(greater_equal, &no_neg, Label::kNear);
- __ neg(exponent);
- __ bind(&no_neg);
+ Label while_true, no_multiply;
+ const uint32_t kClearSignBitMask = 0x7FFFFFFF;
+ __ and_(exponent, Immediate(kClearSignBitMask));
__ bind(&while_true);
__ shr(exponent, 1);
« no previous file with comments | « no previous file | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698