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 2583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2594 Register input = ToRegister(instr->object()); | 2594 Register input = ToRegister(instr->object()); |
2595 __ movq(result, FieldOperand(input, | 2595 __ movq(result, FieldOperand(input, |
2596 ExternalPixelArray::kExternalPointerOffset)); | 2596 ExternalPixelArray::kExternalPointerOffset)); |
2597 } | 2597 } |
2598 | 2598 |
2599 | 2599 |
2600 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { | 2600 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { |
2601 Register arguments = ToRegister(instr->arguments()); | 2601 Register arguments = ToRegister(instr->arguments()); |
2602 Register length = ToRegister(instr->length()); | 2602 Register length = ToRegister(instr->length()); |
2603 Register result = ToRegister(instr->result()); | 2603 Register result = ToRegister(instr->result()); |
2604 | 2604 // There are two words between the frame pointer and the last argument. |
| 2605 // Subtracting from length accounts for one of them add one more. |
2605 if (instr->index()->IsRegister()) { | 2606 if (instr->index()->IsRegister()) { |
2606 __ subl(length, ToRegister(instr->index())); | 2607 __ subl(length, ToRegister(instr->index())); |
2607 } else { | 2608 } else { |
2608 __ subl(length, ToOperand(instr->index())); | 2609 __ subl(length, ToOperand(instr->index())); |
2609 } | 2610 } |
2610 DeoptimizeIf(below_equal, instr->environment()); | |
2611 | |
2612 // There are two words between the frame pointer and the last argument. | |
2613 // Subtracting from length accounts for one of them add one more. | |
2614 __ movq(result, Operand(arguments, length, times_pointer_size, kPointerSize)); | 2611 __ movq(result, Operand(arguments, length, times_pointer_size, kPointerSize)); |
2615 } | 2612 } |
2616 | 2613 |
2617 | 2614 |
2618 void LCodeGen::DoLoadKeyedFastElement(LLoadKeyedFastElement* instr) { | 2615 void LCodeGen::DoLoadKeyedFastElement(LLoadKeyedFastElement* instr) { |
2619 Register result = ToRegister(instr->result()); | 2616 Register result = ToRegister(instr->result()); |
2620 LOperand* key = instr->key(); | 2617 LOperand* key = instr->key(); |
2621 if (!key->IsConstantOperand()) { | 2618 if (!key->IsConstantOperand()) { |
2622 Register key_reg = ToRegister(key); | 2619 Register key_reg = ToRegister(key); |
2623 // Even though the HLoad/StoreKeyedFastElement instructions force the input | 2620 // Even though the HLoad/StoreKeyedFastElement instructions force the input |
(...skipping 2692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5316 FixedArray::kHeaderSize - kPointerSize)); | 5313 FixedArray::kHeaderSize - kPointerSize)); |
5317 __ bind(&done); | 5314 __ bind(&done); |
5318 } | 5315 } |
5319 | 5316 |
5320 | 5317 |
5321 #undef __ | 5318 #undef __ |
5322 | 5319 |
5323 } } // namespace v8::internal | 5320 } } // namespace v8::internal |
5324 | 5321 |
5325 #endif // V8_TARGET_ARCH_X64 | 5322 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |