| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 | 90 |
| 91 void LCodeGen::SaveCallerDoubles() { | 91 void LCodeGen::SaveCallerDoubles() { |
| 92 DCHECK(info()->saves_caller_doubles()); | 92 DCHECK(info()->saves_caller_doubles()); |
| 93 DCHECK(NeedsEagerFrame()); | 93 DCHECK(NeedsEagerFrame()); |
| 94 Comment(";;; Save clobbered callee double registers"); | 94 Comment(";;; Save clobbered callee double registers"); |
| 95 int count = 0; | 95 int count = 0; |
| 96 BitVector* doubles = chunk()->allocated_double_registers(); | 96 BitVector* doubles = chunk()->allocated_double_registers(); |
| 97 BitVector::Iterator save_iterator(doubles); | 97 BitVector::Iterator save_iterator(doubles); |
| 98 while (!save_iterator.Done()) { | 98 while (!save_iterator.Done()) { |
| 99 __ sdc1(DoubleRegister::from_code(save_iterator.Current()), | 99 __ sdc1(DoubleRegister::FromAllocationIndex(save_iterator.Current()), |
| 100 MemOperand(sp, count * kDoubleSize)); | 100 MemOperand(sp, count * kDoubleSize)); |
| 101 save_iterator.Advance(); | 101 save_iterator.Advance(); |
| 102 count++; | 102 count++; |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 | 105 |
| 106 | 106 |
| 107 void LCodeGen::RestoreCallerDoubles() { | 107 void LCodeGen::RestoreCallerDoubles() { |
| 108 DCHECK(info()->saves_caller_doubles()); | 108 DCHECK(info()->saves_caller_doubles()); |
| 109 DCHECK(NeedsEagerFrame()); | 109 DCHECK(NeedsEagerFrame()); |
| 110 Comment(";;; Restore clobbered callee double registers"); | 110 Comment(";;; Restore clobbered callee double registers"); |
| 111 BitVector* doubles = chunk()->allocated_double_registers(); | 111 BitVector* doubles = chunk()->allocated_double_registers(); |
| 112 BitVector::Iterator save_iterator(doubles); | 112 BitVector::Iterator save_iterator(doubles); |
| 113 int count = 0; | 113 int count = 0; |
| 114 while (!save_iterator.Done()) { | 114 while (!save_iterator.Done()) { |
| 115 __ ldc1(DoubleRegister::from_code(save_iterator.Current()), | 115 __ ldc1(DoubleRegister::FromAllocationIndex(save_iterator.Current()), |
| 116 MemOperand(sp, count * kDoubleSize)); | 116 MemOperand(sp, count * kDoubleSize)); |
| 117 save_iterator.Advance(); | 117 save_iterator.Advance(); |
| 118 count++; | 118 count++; |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 | 121 |
| 122 | 122 |
| 123 bool LCodeGen::GeneratePrologue() { | 123 bool LCodeGen::GeneratePrologue() { |
| 124 DCHECK(is_generating()); | 124 DCHECK(is_generating()); |
| 125 | 125 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 396 |
| 397 | 397 |
| 398 bool LCodeGen::GenerateSafepointTable() { | 398 bool LCodeGen::GenerateSafepointTable() { |
| 399 DCHECK(is_done()); | 399 DCHECK(is_done()); |
| 400 safepoints_.Emit(masm(), GetStackSlotCount()); | 400 safepoints_.Emit(masm(), GetStackSlotCount()); |
| 401 return !is_aborted(); | 401 return !is_aborted(); |
| 402 } | 402 } |
| 403 | 403 |
| 404 | 404 |
| 405 Register LCodeGen::ToRegister(int index) const { | 405 Register LCodeGen::ToRegister(int index) const { |
| 406 return Register::from_code(index); | 406 return Register::FromAllocationIndex(index); |
| 407 } | 407 } |
| 408 | 408 |
| 409 | 409 |
| 410 DoubleRegister LCodeGen::ToDoubleRegister(int index) const { | 410 DoubleRegister LCodeGen::ToDoubleRegister(int index) const { |
| 411 return DoubleRegister::from_code(index); | 411 return DoubleRegister::FromAllocationIndex(index); |
| 412 } | 412 } |
| 413 | 413 |
| 414 | 414 |
| 415 Register LCodeGen::ToRegister(LOperand* op) const { | 415 Register LCodeGen::ToRegister(LOperand* op) const { |
| 416 DCHECK(op->IsRegister()); | 416 DCHECK(op->IsRegister()); |
| 417 return ToRegister(op->index()); | 417 return ToRegister(op->index()); |
| 418 } | 418 } |
| 419 | 419 |
| 420 | 420 |
| 421 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { | 421 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { |
| (...skipping 5478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5900 __ Push(at, ToRegister(instr->function())); | 5900 __ Push(at, ToRegister(instr->function())); |
| 5901 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5901 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5902 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5902 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5903 } | 5903 } |
| 5904 | 5904 |
| 5905 | 5905 |
| 5906 #undef __ | 5906 #undef __ |
| 5907 | 5907 |
| 5908 } // namespace internal | 5908 } // namespace internal |
| 5909 } // namespace v8 | 5909 } // namespace v8 |
| OLD | NEW |