| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 395 |
| 396 | 396 |
| 397 bool LCodeGen::GenerateSafepointTable() { | 397 bool LCodeGen::GenerateSafepointTable() { |
| 398 DCHECK(is_done()); | 398 DCHECK(is_done()); |
| 399 safepoints_.Emit(masm(), GetStackSlotCount()); | 399 safepoints_.Emit(masm(), GetStackSlotCount()); |
| 400 return !is_aborted(); | 400 return !is_aborted(); |
| 401 } | 401 } |
| 402 | 402 |
| 403 | 403 |
| 404 Register LCodeGen::ToRegister(int index) const { | 404 Register LCodeGen::ToRegister(int index) const { |
| 405 return Register::from_code(index); | 405 return Register::FromAllocationIndex(index); |
| 406 } | 406 } |
| 407 | 407 |
| 408 | 408 |
| 409 DoubleRegister LCodeGen::ToDoubleRegister(int index) const { | 409 DoubleRegister LCodeGen::ToDoubleRegister(int index) const { |
| 410 return DoubleRegister::from_code(index); | 410 return DoubleRegister::FromAllocationIndex(index); |
| 411 } | 411 } |
| 412 | 412 |
| 413 | 413 |
| 414 Register LCodeGen::ToRegister(LOperand* op) const { | 414 Register LCodeGen::ToRegister(LOperand* op) const { |
| 415 DCHECK(op->IsRegister()); | 415 DCHECK(op->IsRegister()); |
| 416 return ToRegister(op->index()); | 416 return ToRegister(op->index()); |
| 417 } | 417 } |
| 418 | 418 |
| 419 | 419 |
| 420 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { | 420 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { |
| (...skipping 5472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5893 __ Push(at, ToRegister(instr->function())); | 5893 __ Push(at, ToRegister(instr->function())); |
| 5894 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5894 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5895 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5895 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5896 } | 5896 } |
| 5897 | 5897 |
| 5898 | 5898 |
| 5899 #undef __ | 5899 #undef __ |
| 5900 | 5900 |
| 5901 } // namespace internal | 5901 } // namespace internal |
| 5902 } // namespace v8 | 5902 } // namespace v8 |
| OLD | NEW |