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

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

Issue 146693002: A64: Fix NumberTagI for cases calling runtime (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | « src/a64/lithium-a64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index c730da724586943c5ba8adab516e946649a1bba0..805e536f56dc1a183828348c322cdce9030eb736 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -3997,24 +3997,15 @@ void LCodeGen::DoDeferredNumberTagI(LInstruction* instr,
LOperand* temp1,
LOperand* temp2,
IntegerSignedness signedness) {
- Label slow;
+ Label slow, convert_and_store;
Register src = ToRegister32(value);
Register dst = ToRegister(instr->result());
- DoubleRegister dbl_scratch = double_scratch();
-
- Label done;
- if (signedness == SIGNED_INT32) {
- ASM_UNIMPLEMENTED_BREAK("DeferredNumberTagI - signed int32 case.");
- } else {
- ASSERT(signedness == UNSIGNED_INT32);
- __ Ucvtf(dbl_scratch, src);
- }
-
Register scratch1 = ToRegister(temp1);
+
if (FLAG_inline_new) {
Register scratch2 = ToRegister(temp2);
__ AllocateHeapNumber(dst, &slow, scratch1, scratch2);
- __ B(&done);
+ __ B(&convert_and_store);
}
// Slow case: call the runtime system to do the number allocation.
@@ -4039,9 +4030,16 @@ void LCodeGen::DoDeferredNumberTagI(LInstruction* instr,
__ StoreToSafepointRegisterSlot(x0, dst);
}
- // Done. Move converted value in dbl_scratch into the newly allocated heap
+ // Convert number to floating point and store in the newly allocated heap
// number.
- __ Bind(&done);
+ __ Bind(&convert_and_store);
+ DoubleRegister dbl_scratch = double_scratch();
+ if (signedness == SIGNED_INT32) {
+ ASM_UNIMPLEMENTED_BREAK("DeferredNumberTagI - signed int32 case.");
+ } else {
+ ASSERT(signedness == UNSIGNED_INT32);
+ __ Ucvtf(dbl_scratch, src);
+ }
__ Str(dbl_scratch, FieldMemOperand(dst, HeapNumber::kValueOffset));
}
« no previous file with comments | « src/a64/lithium-a64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698