Revision: 18811
Author: [email protected]
Date: Fri Jan 24 11:30:56 2014 UTC
Log: A64: Fix NumberTagI for cases calling runtime
Avoid need to preserve FP double scratch register across CallRuntime in
NumberTagI deferred code.
BUG=none
[email protected]
Review URL: https://codereview.chromium.org/146693002
http://code.google.com/p/v8/source/detail?r=18811
Modified:
/branches/experimental/a64/src/a64/lithium-a64.cc
/branches/experimental/a64/src/a64/lithium-codegen-a64.cc
=======================================
--- /branches/experimental/a64/src/a64/lithium-a64.cc Thu Jan 23 18:07:26
2014 UTC
+++ /branches/experimental/a64/src/a64/lithium-a64.cc Fri Jan 24 11:30:56
2014 UTC
@@ -1133,9 +1133,9 @@
info()->MarkAsDeferredCalling();
if (to.IsTagged()) {
HValue* val = instr->value();
- LOperand* value = UseRegisterAtStart(val);
if (val->CheckFlag(HInstruction::kUint32)) {
+ LOperand* value = UseRegister(val);
LNumberTagU* result = new(zone()) LNumberTagU(value,
TempRegister(),
TempRegister());
@@ -1143,6 +1143,7 @@
} else {
STATIC_ASSERT((kMinInt == Smi::kMinValue) &&
(kMaxInt == Smi::kMaxValue));
+ LOperand* value = UseRegisterAtStart(val);
return DefineAsRegister(new(zone()) LSmiTag(value));
}
} else if (to.IsSmi()) {
=======================================
--- /branches/experimental/a64/src/a64/lithium-codegen-a64.cc Fri Jan 24
11:10:42 2014 UTC
+++ /branches/experimental/a64/src/a64/lithium-codegen-a64.cc Fri Jan 24
11:30:56 2014 UTC
@@ -3999,24 +3999,15 @@
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();
+ Register scratch1 = ToRegister(temp1);
- 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.
@@ -4041,9 +4032,16 @@
__ 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));
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.