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

Unified Diff: src/x64/code-stubs-x64.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 | « src/ia32/code-stubs-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index a617d521f3378c01418bcbe38c4993399585bbaf..46a5487c7149c4279267252b5ecf2e74762fe8fc 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -2181,11 +2181,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;
- __ cmpl(scratch, Immediate(0));
- __ j(positive, &no_neg, Label::kNear);
- __ negl(scratch);
- __ bind(&no_neg);
+ Label while_true, no_multiply;
+ const uint32_t kClearSignBitMask = 0x7FFFFFFF;
+ __ andl(scratch, Immediate(kClearSignBitMask));
__ bind(&while_true);
__ shrl(scratch, Immediate(1));
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698