OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_PPC_CODE_STUBS_PPC_H_ | 5 #ifndef V8_PPC_CODE_STUBS_PPC_H_ |
6 #define V8_PPC_CODE_STUBS_PPC_H_ | 6 #define V8_PPC_CODE_STUBS_PPC_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 // If we have to call into C then we need to save and restore all caller- | 175 // If we have to call into C then we need to save and restore all caller- |
176 // saved registers that were not already preserved. The scratch registers | 176 // saved registers that were not already preserved. The scratch registers |
177 // will be restored by other means so we don't bother pushing them here. | 177 // will be restored by other means so we don't bother pushing them here. |
178 void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) { | 178 void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) { |
179 masm->mflr(r0); | 179 masm->mflr(r0); |
180 masm->push(r0); | 180 masm->push(r0); |
181 masm->MultiPush(kJSCallerSaved & ~scratch1_.bit()); | 181 masm->MultiPush(kJSCallerSaved & ~scratch1_.bit()); |
182 if (mode == kSaveFPRegs) { | 182 if (mode == kSaveFPRegs) { |
183 // Save all volatile FP registers except d0. | 183 // Save all volatile FP registers except d0. |
184 masm->SaveFPRegs(sp, 1, DoubleRegister::kNumVolatileRegisters - 1); | 184 masm->MultiPushDoubles(kCallerSavedDoubles & ~d0.bit()); |
185 } | 185 } |
186 } | 186 } |
187 | 187 |
188 inline void RestoreCallerSaveRegisters(MacroAssembler* masm, | 188 inline void RestoreCallerSaveRegisters(MacroAssembler* masm, |
189 SaveFPRegsMode mode) { | 189 SaveFPRegsMode mode) { |
190 if (mode == kSaveFPRegs) { | 190 if (mode == kSaveFPRegs) { |
191 // Restore all volatile FP registers except d0. | 191 // Restore all volatile FP registers except d0. |
192 masm->RestoreFPRegs(sp, 1, DoubleRegister::kNumVolatileRegisters - 1); | 192 masm->MultiPopDoubles(kCallerSavedDoubles & ~d0.bit()); |
193 } | 193 } |
194 masm->MultiPop(kJSCallerSaved & ~scratch1_.bit()); | 194 masm->MultiPop(kJSCallerSaved & ~scratch1_.bit()); |
195 masm->pop(r0); | 195 masm->pop(r0); |
196 masm->mtlr(r0); | 196 masm->mtlr(r0); |
197 } | 197 } |
198 | 198 |
199 inline Register object() { return object_; } | 199 inline Register object() { return object_; } |
200 inline Register address() { return address_; } | 200 inline Register address() { return address_; } |
201 inline Register scratch0() { return scratch0_; } | 201 inline Register scratch0() { return scratch0_; } |
202 inline Register scratch1() { return scratch1_; } | 202 inline Register scratch1() { return scratch1_; } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 316 |
317 class LookupModeBits : public BitField<LookupMode, 0, 1> {}; | 317 class LookupModeBits : public BitField<LookupMode, 0, 1> {}; |
318 | 318 |
319 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 319 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
320 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 320 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
321 }; | 321 }; |
322 } | 322 } |
323 } // namespace v8::internal | 323 } // namespace v8::internal |
324 | 324 |
325 #endif // V8_PPC_CODE_STUBS_PPC_H_ | 325 #endif // V8_PPC_CODE_STUBS_PPC_H_ |
OLD | NEW |