OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2061 context = UseRegister(instr->context()); | 2061 context = UseRegister(instr->context()); |
2062 value = UseRegister(instr->value()); | 2062 value = UseRegister(instr->value()); |
2063 temp = NULL; | 2063 temp = NULL; |
2064 } | 2064 } |
2065 LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); | 2065 LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); |
2066 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; | 2066 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; |
2067 } | 2067 } |
2068 | 2068 |
2069 | 2069 |
2070 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 2070 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
2071 if (instr->access().IsExternalMemory() && instr->access().offset() == 0) { | 2071 // Use the special mov rax, moffs64 encoding for external |
| 2072 // memory accesses with 64-bit word-sized values. |
| 2073 if (instr->access().IsExternalMemory() && |
| 2074 instr->access().offset() == 0 && |
| 2075 (instr->access().representation().IsSmi() || |
| 2076 instr->access().representation().IsTagged() || |
| 2077 instr->access().representation().IsHeapObject() || |
| 2078 instr->access().representation().IsExternal())) { |
2072 LOperand* obj = UseRegisterOrConstantAtStart(instr->object()); | 2079 LOperand* obj = UseRegisterOrConstantAtStart(instr->object()); |
2073 return DefineFixed(new(zone()) LLoadNamedField(obj), rax); | 2080 return DefineFixed(new(zone()) LLoadNamedField(obj), rax); |
2074 } | 2081 } |
2075 LOperand* obj = UseRegisterAtStart(instr->object()); | 2082 LOperand* obj = UseRegisterAtStart(instr->object()); |
2076 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2083 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
2077 } | 2084 } |
2078 | 2085 |
2079 | 2086 |
2080 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2087 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
2081 LOperand* object = UseFixed(instr->object(), rax); | 2088 LOperand* object = UseFixed(instr->object(), rax); |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2546 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2553 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2547 LOperand* object = UseRegister(instr->object()); | 2554 LOperand* object = UseRegister(instr->object()); |
2548 LOperand* index = UseTempRegister(instr->index()); | 2555 LOperand* index = UseTempRegister(instr->index()); |
2549 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2556 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2550 } | 2557 } |
2551 | 2558 |
2552 | 2559 |
2553 } } // namespace v8::internal | 2560 } } // namespace v8::internal |
2554 | 2561 |
2555 #endif // V8_TARGET_ARCH_X64 | 2562 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |