Chromium Code Reviews| Index: src/x64/lithium-codegen-x64.cc |
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
| index 72091c3e4d371e6258e83317f2177b306c25cab3..f9ddf21592bca49057a14364d613b5a4f8d5fcd8 100644 |
| --- a/src/x64/lithium-codegen-x64.cc |
| +++ b/src/x64/lithium-codegen-x64.cc |
| @@ -273,6 +273,14 @@ void LCodeGen::GenerateOsrPrologue() { |
| } |
| +void LCodeGen::GenerateBodyInstructionPost(LInstruction* instr) { |
| + if (instr->HasResult() && instr->MustSignExtendResult(chunk())) { |
| + Register result_reg = ToRegister(instr->result()); |
|
danno
2014/03/18 08:21:31
I think this might be a problem for some HValues t
Weiliang
2014/03/19 08:55:31
The testcase shows a HChange between HParameters a
|
| + __ movsxlq(result_reg, result_reg); |
| + } |
| +} |
| + |
| + |
| bool LCodeGen::GenerateJumpTable() { |
| Label needs_frame; |
| if (jump_table_.length() > 0) { |
| @@ -2868,19 +2876,6 @@ void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { |
| void LCodeGen::DoLoadKeyedExternalArray(LLoadKeyed* instr) { |
| ElementsKind elements_kind = instr->elements_kind(); |
| LOperand* key = instr->key(); |
| - if (!key->IsConstantOperand()) { |
| - Register key_reg = ToRegister(key); |
| - // Even though the HLoad/StoreKeyed (in this case) instructions force |
| - // the input representation for the key to be an integer, the input |
| - // gets replaced during bound check elimination with the index argument |
| - // to the bounds check, which can be tagged, so that case must be |
| - // handled here, too. |
| - if (instr->hydrogen()->IsDehoisted()) { |
| - // Sign extend key because it could be a 32 bit negative value |
| - // and the dehoisted address computation happens in 64 bits |
| - __ movsxlq(key_reg, key_reg); |
| - } |
| - } |
| int base_offset = instr->is_fixed_typed_array() |
| ? FixedTypedArrayBase::kDataOffset - kHeapObjectTag |
| : 0; |
| @@ -2954,19 +2949,6 @@ void LCodeGen::DoLoadKeyedExternalArray(LLoadKeyed* instr) { |
| void LCodeGen::DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr) { |
| XMMRegister result(ToDoubleRegister(instr->result())); |
| LOperand* key = instr->key(); |
| - if (!key->IsConstantOperand()) { |
| - Register key_reg = ToRegister(key); |
| - // Even though the HLoad/StoreKeyed instructions force the input |
| - // representation for the key to be an integer, the input gets replaced |
| - // during bound check elimination with the index argument to the bounds |
| - // check, which can be tagged, so that case must be handled here, too. |
| - if (instr->hydrogen()->IsDehoisted()) { |
| - // Sign extend key because it could be a 32 bit negative value |
| - // and the dehoisted address computation happens in 64 bits |
| - __ movsxlq(key_reg, key_reg); |
| - } |
| - } |
| - |
| if (instr->hydrogen()->RequiresHoleCheck()) { |
| int offset = FixedDoubleArray::kHeaderSize - kHeapObjectTag + |
| sizeof(kHoleNanLower32); |
| @@ -2994,20 +2976,6 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) { |
| HLoadKeyed* hinstr = instr->hydrogen(); |
| Register result = ToRegister(instr->result()); |
| LOperand* key = instr->key(); |
| - if (!key->IsConstantOperand()) { |
| - Register key_reg = ToRegister(key); |
| - // Even though the HLoad/StoreKeyedFastElement instructions force |
| - // the input representation for the key to be an integer, the input |
| - // gets replaced during bound check elimination with the index |
| - // argument to the bounds check, which can be tagged, so that |
| - // case must be handled here, too. |
| - if (hinstr->IsDehoisted()) { |
| - // Sign extend key because it could be a 32 bit negative value |
| - // and the dehoisted address computation happens in 64 bits |
| - __ movsxlq(key_reg, key_reg); |
| - } |
| - } |
| - |
| bool requires_hole_check = hinstr->RequiresHoleCheck(); |
| int offset = FixedArray::kHeaderSize - kHeapObjectTag; |
| Representation representation = hinstr->representation(); |
| @@ -4067,19 +4035,6 @@ void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { |
| void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) { |
| ElementsKind elements_kind = instr->elements_kind(); |
| LOperand* key = instr->key(); |
| - if (!key->IsConstantOperand()) { |
| - Register key_reg = ToRegister(key); |
| - // Even though the HLoad/StoreKeyedFastElement instructions force |
| - // the input representation for the key to be an integer, the input |
| - // gets replaced during bound check elimination with the index |
| - // argument to the bounds check, which can be tagged, so that case |
| - // must be handled here, too. |
| - if (instr->hydrogen()->IsDehoisted()) { |
| - // Sign extend key because it could be a 32 bit negative value |
| - // and the dehoisted address computation happens in 64 bits |
| - __ movsxlq(key_reg, key_reg); |
| - } |
| - } |
| int base_offset = instr->is_fixed_typed_array() |
| ? FixedTypedArrayBase::kDataOffset - kHeapObjectTag |
| : 0; |
| @@ -4143,20 +4098,6 @@ void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) { |
| void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { |
| XMMRegister value = ToDoubleRegister(instr->value()); |
| LOperand* key = instr->key(); |
| - if (!key->IsConstantOperand()) { |
| - Register key_reg = ToRegister(key); |
| - // Even though the HLoad/StoreKeyedFastElement instructions force |
| - // the input representation for the key to be an integer, the |
| - // input gets replaced during bound check elimination with the index |
| - // argument to the bounds check, which can be tagged, so that case |
| - // must be handled here, too. |
| - if (instr->hydrogen()->IsDehoisted()) { |
| - // Sign extend key because it could be a 32 bit negative value |
| - // and the dehoisted address computation happens in 64 bits |
| - __ movsxlq(key_reg, key_reg); |
| - } |
| - } |
| - |
| if (instr->NeedsCanonicalization()) { |
| Label have_value; |
| @@ -4184,20 +4125,6 @@ void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { |
| void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) { |
| HStoreKeyed* hinstr = instr->hydrogen(); |
| LOperand* key = instr->key(); |
| - if (!key->IsConstantOperand()) { |
| - Register key_reg = ToRegister(key); |
| - // Even though the HLoad/StoreKeyedFastElement instructions force |
| - // the input representation for the key to be an integer, the |
| - // input gets replaced during bound check elimination with the index |
| - // argument to the bounds check, which can be tagged, so that case |
| - // must be handled here, too. |
| - if (hinstr->IsDehoisted()) { |
| - // Sign extend key because it could be a 32 bit negative value |
| - // and the dehoisted address computation happens in 64 bits |
| - __ movsxlq(key_reg, key_reg); |
| - } |
| - } |
| - |
| int offset = FixedArray::kHeaderSize - kHeapObjectTag; |
| Representation representation = hinstr->value()->representation(); |