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

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

Issue 8889047: Fixing bug introduced in r10210 that crashes v8 raytrace benchmark. (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 | test/mjsunit/math-pow.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index a9d9676b3f4e741e913f71598e8eb4f57d1203f8..282df1565471a031b02ee8afe01397aa8253a053 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -3515,14 +3515,14 @@ void MathPowStub::Generate(MacroAssembler* masm) {
}
if (exponent_type_ != INTEGER) {
+ Label int_exponent_convert;
// Detect integer exponents stored as double.
__ vcvt_u32_f64(single_scratch, double_exponent);
// We do not check for NaN or Infinity here because comparing numbers on
// ARM correctly distinguishes NaNs. We end up calling the built-in.
__ vcvt_f64_u32(double_scratch, single_scratch);
__ VFPCompareAndSetFlags(double_scratch, double_exponent);
- __ vmov(exponent, single_scratch, eq);
Yang 2011/12/09 12:04:37 We try to detect integer values saved in the doubl
- __ b(eq, &int_exponent);
+ __ b(eq, &int_exponent_convert);
if (exponent_type_ == ON_STACK) {
// Detect square root case. Crankshaft detects constant +/-0.5 at
@@ -3579,6 +3579,10 @@ void MathPowStub::Generate(MacroAssembler* masm) {
__ pop(lr);
__ GetCFunctionDoubleResult(double_result);
__ jmp(&done);
+
+ __ bind(&int_exponent_convert);
+ __ vcvt_u32_f64(single_scratch, double_exponent);
+ __ vmov(exponent, single_scratch);
}
// Calculate power with integer exponent.
@@ -3629,7 +3633,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
FieldMemOperand(heapnumber, HeapNumber::kValueOffset));
ASSERT(heapnumber.is(r0));
__ IncrementCounter(counters->math_pow(), 1, scratch, scratch2);
- __ Ret(2 * kPointerSize);
+ __ Ret(2);
Yang 2011/12/09 12:04:37 On ARM we don't multiply with kPointerSize.
} else {
__ push(lr);
{
« no previous file with comments | « no previous file | test/mjsunit/math-pow.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698