Revision: 14865
Author: [email protected]
Date: Tue May 28 14:37:57 2013
Log: MIPS: Update the gap resolver to support Smi constants.
Port r14850 (787f0941)
BUG=
Review URL: https://codereview.chromium.org/16146005
http://code.google.com/p/v8/source/detail?r=14865
Modified:
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-codegen-mips.h
/branches/bleeding_edge/src/mips/lithium-gap-resolver-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue May 28
14:37:03 2013
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue May 28
14:37:57 2013
@@ -519,6 +519,12 @@
HConstant* constant = chunk_->LookupConstant(op);
return constant->Integer32Value();
}
+
+
+Smi* LCodeGen::ToSmi(LConstantOperand* op) const {
+ HConstant* constant = chunk_->LookupConstant(op);
+ return Smi::FromInt(constant->Integer32Value());
+}
double LCodeGen::ToDouble(LConstantOperand* op) const {
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.h Thu May 23
18:05:42 2013
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.h Tue May 28
14:37:57 2013
@@ -118,6 +118,7 @@
FloatRegister flt_scratch,
DoubleRegister dbl_scratch);
int ToInteger32(LConstantOperand* op) const;
+ Smi* ToSmi(LConstantOperand* op) const;
double ToDouble(LConstantOperand* op) const;
Operand ToOperand(LOperand* op);
MemOperand ToMemOperand(LOperand* op) const;
=======================================
--- /branches/bleeding_edge/src/mips/lithium-gap-resolver-mips.cc Tue Apr
16 04:33:02 2013
+++ /branches/bleeding_edge/src/mips/lithium-gap-resolver-mips.cc Tue May
28 14:37:57 2013
@@ -252,7 +252,9 @@
LConstantOperand* constant_source = LConstantOperand::cast(source);
if (destination->IsRegister()) {
Register dst = cgen_->ToRegister(destination);
- if (cgen_->IsInteger32(constant_source)) {
+ if (cgen_->IsSmi(constant_source)) {
+ __ li(dst, Operand(cgen_->ToSmi(constant_source)));
+ } else if (cgen_->IsInteger32(constant_source)) {
__ li(dst, Operand(cgen_->ToInteger32(constant_source)));
} else {
__ LoadObject(dst, cgen_->ToHandle(constant_source));
@@ -260,7 +262,9 @@
} else {
ASSERT(destination->IsStackSlot());
ASSERT(!in_cycle_); // Constant moves happen after all cycles are
gone.
- if (cgen_->IsInteger32(constant_source)) {
+ if (cgen_->IsSmi(constant_source)) {
+ __ li(kLithiumScratchReg, Operand(cgen_->ToSmi(constant_source)));
+ } else if (cgen_->IsInteger32(constant_source)) {
__ li(kLithiumScratchReg,
Operand(cgen_->ToInteger32(constant_source)));
} else {
--
--
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.