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 2540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2551 BitVector::Iterator save_iterator(doubles); | 2551 BitVector::Iterator save_iterator(doubles); |
2552 int count = 0; | 2552 int count = 0; |
2553 while (!save_iterator.Done()) { | 2553 while (!save_iterator.Done()) { |
2554 __ ldc1(DoubleRegister::FromAllocationIndex(save_iterator.Current()), | 2554 __ ldc1(DoubleRegister::FromAllocationIndex(save_iterator.Current()), |
2555 MemOperand(sp, count * kDoubleSize)); | 2555 MemOperand(sp, count * kDoubleSize)); |
2556 save_iterator.Advance(); | 2556 save_iterator.Advance(); |
2557 count++; | 2557 count++; |
2558 } | 2558 } |
2559 } | 2559 } |
2560 if (NeedsEagerFrame()) { | 2560 if (NeedsEagerFrame()) { |
2561 int32_t sp_delta = (GetParameterCount() + 1) * kPointerSize; | |
2562 __ mov(sp, fp); | 2561 __ mov(sp, fp); |
2563 __ Pop(ra, fp); | 2562 __ Pop(ra, fp); |
2564 if (!info()->IsStub()) { | 2563 |
2565 __ Addu(sp, sp, Operand(sp_delta)); | 2564 if (instr->has_constant_parameter_count()) { |
| 2565 int parameter_count = ToInteger32(instr->constant_parameter_count()); |
| 2566 int32_t sp_delta = (parameter_count + 1) * kPointerSize; |
| 2567 if (sp_delta != 0) { |
| 2568 __ Addu(sp, sp, Operand(sp_delta)); |
| 2569 } |
| 2570 } else { |
| 2571 Register reg = ToRegister(instr->parameter_count()); |
| 2572 __ Addu(reg, reg, Operand(1)); |
| 2573 __ sll(at, reg, kPointerSizeLog2); |
| 2574 __ Addu(sp, sp, at); |
2566 } | 2575 } |
2567 } | 2576 } |
2568 __ Jump(ra); | 2577 __ Jump(ra); |
2569 } | 2578 } |
2570 | 2579 |
2571 | 2580 |
2572 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { | 2581 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { |
2573 Register result = ToRegister(instr->result()); | 2582 Register result = ToRegister(instr->result()); |
2574 __ li(at, Operand(Handle<Object>(instr->hydrogen()->cell()))); | 2583 __ li(at, Operand(Handle<Object>(instr->hydrogen()->cell()))); |
2575 __ lw(result, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset)); | 2584 __ lw(result, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset)); |
(...skipping 3517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6093 __ Subu(scratch, result, scratch); | 6102 __ Subu(scratch, result, scratch); |
6094 __ lw(result, FieldMemOperand(scratch, | 6103 __ lw(result, FieldMemOperand(scratch, |
6095 FixedArray::kHeaderSize - kPointerSize)); | 6104 FixedArray::kHeaderSize - kPointerSize)); |
6096 __ bind(&done); | 6105 __ bind(&done); |
6097 } | 6106 } |
6098 | 6107 |
6099 | 6108 |
6100 #undef __ | 6109 #undef __ |
6101 | 6110 |
6102 } } // namespace v8::internal | 6111 } } // namespace v8::internal |
OLD | NEW |