Revision: 21806
Author: [email protected]
Date: Thu Jun 12 12:00:14 2014 UTC
Log: Sign extend the dehoisted key at the definition point for x64
port only; for x32 port, we need to sign extend the dehoisted key at the
use points.
[email protected]
Review URL: https://codereview.chromium.org/328553005
http://code.google.com/p/v8/source/detail?r=21806
Modified:
/branches/bleeding_edge/src/x64/lithium-codegen-x64.cc
/branches/bleeding_edge/src/x64/lithium-x64.cc
=======================================
--- /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Wed Jun 11
13:29:25 2014 UTC
+++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Thu Jun 12
12:00:14 2014 UTC
@@ -275,6 +275,11 @@
}
if (instr->HasResult() && instr->MustSignExtendResult(chunk())) {
+ // We sign extend the dehoisted key at the definition point when the
pointer
+ // size is 64-bit. For x32 port, we sign extend the dehoisted key at
the use
+ // points and MustSignExtendResult is always false. We can't use
+ // STATIC_ASSERT here as the pointer size is 32-bit for x32.
+ ASSERT(kPointerSize == kInt64Size);
if (instr->result()->IsRegister()) {
Register result_reg = ToRegister(instr->result());
__ movsxlq(result_reg, result_reg);
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.cc Tue Jun 10 04:08:48 2014
UTC
+++ /branches/bleeding_edge/src/x64/lithium-x64.cc Thu Jun 12 12:00:14 2014
UTC
@@ -2110,6 +2110,11 @@
void LChunkBuilder::FindDehoistedKeyDefinitions(HValue* candidate) {
+ // We sign extend the dehoisted key at the definition point when the
pointer
+ // size is 64-bit. For x32 port, we sign extend the dehoisted key at the
use
+ // points and should not invoke this function. We can't use STATIC_ASSERT
+ // here as the pointer size is 32-bit for x32.
+ ASSERT(kPointerSize == kInt64Size);
BitVector* dehoisted_key_ids = chunk_->GetDehoistedKeyIds();
if (dehoisted_key_ids->Contains(candidate->id())) return;
dehoisted_key_ids->Add(candidate->id());
@@ -2126,7 +2131,7 @@
LOperand* key = UseRegisterOrConstantAtStart(instr->key());
LInstruction* result = NULL;
- if (instr->IsDehoisted()) {
+ if ((kPointerSize == kInt64Size) && instr->IsDehoisted()) {
FindDehoistedKeyDefinitions(instr->key());
}
@@ -2171,7 +2176,7 @@
LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
ElementsKind elements_kind = instr->elements_kind();
- if (instr->IsDehoisted()) {
+ if ((kPointerSize == kInt64Size) && instr->IsDehoisted()) {
FindDehoistedKeyDefinitions(instr->key());
}
--
--
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/d/optout.