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

Unified Diff: src/arm/lithium-codegen-arm.cc

Issue 23496041: ARM: EmitNumberUntagD() Improvment (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index cf76a086720a7282487f2d59ddd09f6938c79759..e264cc7c4df768fe192beafe55f5882120d9eebf 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -4886,7 +4886,13 @@ void LCodeGen::EmitNumberUntagD(Register input_reg,
DeoptimizeIf(ne, env);
} else {
Label heap_number, convert;
+ if (!deoptimize_on_minus_zero) {
+ __ vldr(result_reg, input_reg,
+ HeapNumber::kValueOffset - kHeapObjectTag, eq);
+ __ b(eq, &done);
+ } else {
__ b(eq, &heap_number);
Benedikt Meurer 2013/09/12 07:23:41 Nit: indentation.
+ }
// Convert undefined (and hole) to NaN.
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
@@ -4900,8 +4906,11 @@ void LCodeGen::EmitNumberUntagD(Register input_reg,
__ bind(&heap_number);
}
+
// Heap number to double register conversion.
- __ vldr(result_reg, input_reg, HeapNumber::kValueOffset - kHeapObjectTag);
+ if (!can_convert_undefined_to_nan || deoptimize_on_minus_zero) {
+ __ vldr(result_reg, input_reg, HeapNumber::kValueOffset - kHeapObjectTag);
+ }
if (deoptimize_on_minus_zero) {
__ VmovLow(scratch, result_reg);
__ cmp(scratch, Operand::Zero());
@@ -4925,6 +4934,7 @@ void LCodeGen::EmitNumberUntagD(Register input_reg,
}
+
Benedikt Meurer 2013/09/12 07:23:41 Nit: new line.
void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) {
Register input_reg = ToRegister(instr->value());
Register scratch1 = scratch0();
« 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