| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 | 64 |
| 65 class StoreBufferOverflowStub: public PlatformCodeStub { | 65 class StoreBufferOverflowStub: public PlatformCodeStub { |
| 66 public: | 66 public: |
| 67 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) | 67 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) |
| 68 : save_doubles_(save_fp) {} | 68 : save_doubles_(save_fp) {} |
| 69 | 69 |
| 70 void Generate(MacroAssembler* masm); | 70 void Generate(MacroAssembler* masm); |
| 71 | 71 |
| 72 virtual bool IsPregenerated(Isolate* isolate) V8_OVERRIDE { return true; } | |
| 73 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | 72 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); |
| 74 virtual bool SometimesSetsUpAFrame() { return false; } | 73 virtual bool SometimesSetsUpAFrame() { return false; } |
| 75 | 74 |
| 76 private: | 75 private: |
| 77 SaveFPRegsMode save_doubles_; | 76 SaveFPRegsMode save_doubles_; |
| 78 | 77 |
| 79 Major MajorKey() { return StoreBufferOverflow; } | 78 Major MajorKey() { return StoreBufferOverflow; } |
| 80 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } | 79 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } |
| 81 }; | 80 }; |
| 82 | 81 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 : the_int_(the_int), | 232 : the_int_(the_int), |
| 234 the_heap_number_(the_heap_number), | 233 the_heap_number_(the_heap_number), |
| 235 scratch_(scratch), | 234 scratch_(scratch), |
| 236 sign_(scratch2) { | 235 sign_(scratch2) { |
| 237 ASSERT(IntRegisterBits::is_valid(the_int_.code())); | 236 ASSERT(IntRegisterBits::is_valid(the_int_.code())); |
| 238 ASSERT(HeapNumberRegisterBits::is_valid(the_heap_number_.code())); | 237 ASSERT(HeapNumberRegisterBits::is_valid(the_heap_number_.code())); |
| 239 ASSERT(ScratchRegisterBits::is_valid(scratch_.code())); | 238 ASSERT(ScratchRegisterBits::is_valid(scratch_.code())); |
| 240 ASSERT(SignRegisterBits::is_valid(sign_.code())); | 239 ASSERT(SignRegisterBits::is_valid(sign_.code())); |
| 241 } | 240 } |
| 242 | 241 |
| 243 virtual bool IsPregenerated(Isolate* isolate) V8_OVERRIDE; | |
| 244 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | 242 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); |
| 245 | 243 |
| 246 private: | 244 private: |
| 247 Register the_int_; | 245 Register the_int_; |
| 248 Register the_heap_number_; | 246 Register the_heap_number_; |
| 249 Register scratch_; | 247 Register scratch_; |
| 250 Register sign_; | 248 Register sign_; |
| 251 | 249 |
| 252 // Minor key encoding in 16 bits. | 250 // Minor key encoding in 16 bits. |
| 253 class IntRegisterBits: public BitField<int, 0, 4> {}; | 251 class IntRegisterBits: public BitField<int, 0, 4> {}; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 284 address, // An input reg. | 282 address, // An input reg. |
| 285 value) { // One scratch reg. | 283 value) { // One scratch reg. |
| 286 } | 284 } |
| 287 | 285 |
| 288 enum Mode { | 286 enum Mode { |
| 289 STORE_BUFFER_ONLY, | 287 STORE_BUFFER_ONLY, |
| 290 INCREMENTAL, | 288 INCREMENTAL, |
| 291 INCREMENTAL_COMPACTION | 289 INCREMENTAL_COMPACTION |
| 292 }; | 290 }; |
| 293 | 291 |
| 294 virtual bool IsPregenerated(Isolate* isolate) V8_OVERRIDE; | |
| 295 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | |
| 296 virtual bool SometimesSetsUpAFrame() { return false; } | 292 virtual bool SometimesSetsUpAFrame() { return false; } |
| 297 | 293 |
| 298 static void PatchBranchIntoNop(MacroAssembler* masm, int pos) { | 294 static void PatchBranchIntoNop(MacroAssembler* masm, int pos) { |
| 299 const unsigned offset = masm->instr_at(pos) & kImm16Mask; | 295 const unsigned offset = masm->instr_at(pos) & kImm16Mask; |
| 300 masm->instr_at_put(pos, BNE | (zero_reg.code() << kRsShift) | | 296 masm->instr_at_put(pos, BNE | (zero_reg.code() << kRsShift) | |
| 301 (zero_reg.code() << kRtShift) | (offset & kImm16Mask)); | 297 (zero_reg.code() << kRtShift) | (offset & kImm16Mask)); |
| 302 ASSERT(Assembler::IsBne(masm->instr_at(pos))); | 298 ASSERT(Assembler::IsBne(masm->instr_at(pos))); |
| 303 } | 299 } |
| 304 | 300 |
| 305 static void PatchNopIntoBranch(MacroAssembler* masm, int pos) { | 301 static void PatchNopIntoBranch(MacroAssembler* masm, int pos) { |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 | 516 |
| 521 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 517 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
| 522 | 518 |
| 523 LookupMode mode_; | 519 LookupMode mode_; |
| 524 }; | 520 }; |
| 525 | 521 |
| 526 | 522 |
| 527 } } // namespace v8::internal | 523 } } // namespace v8::internal |
| 528 | 524 |
| 529 #endif // V8_MIPS_CODE_STUBS_ARM_H_ | 525 #endif // V8_MIPS_CODE_STUBS_ARM_H_ |
| OLD | NEW |