| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 class StoreBufferOverflowStub: public PlatformCodeStub { | 68 class StoreBufferOverflowStub: public PlatformCodeStub { |
| 69 public: | 69 public: |
| 70 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) | 70 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) |
| 71 : save_doubles_(save_fp) { | 71 : save_doubles_(save_fp) { |
| 72 ASSERT(CpuFeatures::IsSafeForSnapshot(SSE2) || save_fp == kDontSaveFPRegs); | 72 ASSERT(CpuFeatures::IsSafeForSnapshot(SSE2) || save_fp == kDontSaveFPRegs); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void Generate(MacroAssembler* masm); | 75 void Generate(MacroAssembler* masm); |
| 76 | 76 |
| 77 virtual bool IsPregenerated() { return true; } | 77 virtual bool IsPregenerated(Isolate* isolate) V8_OVERRIDE { return true; } |
| 78 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | 78 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); |
| 79 virtual bool SometimesSetsUpAFrame() { return false; } | 79 virtual bool SometimesSetsUpAFrame() { return false; } |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 SaveFPRegsMode save_doubles_; | 82 SaveFPRegsMode save_doubles_; |
| 83 | 83 |
| 84 Major MajorKey() { return StoreBufferOverflow; } | 84 Major MajorKey() { return StoreBufferOverflow; } |
| 85 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } | 85 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } |
| 86 }; | 86 }; |
| 87 | 87 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 value) { // One scratch reg. | 320 value) { // One scratch reg. |
| 321 ASSERT(CpuFeatures::IsSafeForSnapshot(SSE2) || fp_mode == kDontSaveFPRegs); | 321 ASSERT(CpuFeatures::IsSafeForSnapshot(SSE2) || fp_mode == kDontSaveFPRegs); |
| 322 } | 322 } |
| 323 | 323 |
| 324 enum Mode { | 324 enum Mode { |
| 325 STORE_BUFFER_ONLY, | 325 STORE_BUFFER_ONLY, |
| 326 INCREMENTAL, | 326 INCREMENTAL, |
| 327 INCREMENTAL_COMPACTION | 327 INCREMENTAL_COMPACTION |
| 328 }; | 328 }; |
| 329 | 329 |
| 330 virtual bool IsPregenerated(); | 330 virtual bool IsPregenerated(Isolate* isolate) V8_OVERRIDE; |
| 331 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | 331 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); |
| 332 virtual bool SometimesSetsUpAFrame() { return false; } | 332 virtual bool SometimesSetsUpAFrame() { return false; } |
| 333 | 333 |
| 334 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. | 334 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. |
| 335 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. | 335 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. |
| 336 | 336 |
| 337 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. | 337 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. |
| 338 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. | 338 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. |
| 339 | 339 |
| 340 static Mode GetMode(Code* stub) { | 340 static Mode GetMode(Code* stub) { |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 Register address_; | 559 Register address_; |
| 560 RememberedSetAction remembered_set_action_; | 560 RememberedSetAction remembered_set_action_; |
| 561 SaveFPRegsMode save_fp_regs_mode_; | 561 SaveFPRegsMode save_fp_regs_mode_; |
| 562 RegisterAllocation regs_; | 562 RegisterAllocation regs_; |
| 563 }; | 563 }; |
| 564 | 564 |
| 565 | 565 |
| 566 } } // namespace v8::internal | 566 } } // namespace v8::internal |
| 567 | 567 |
| 568 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 568 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
| OLD | NEW |