| 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(Isolate* isolate) V8_OVERRIDE { return true; } | |
| 78 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | 77 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); |
| 79 virtual bool SometimesSetsUpAFrame() { return false; } | 78 virtual bool SometimesSetsUpAFrame() { return false; } |
| 80 | 79 |
| 81 private: | 80 private: |
| 82 SaveFPRegsMode save_doubles_; | 81 SaveFPRegsMode save_doubles_; |
| 83 | 82 |
| 84 Major MajorKey() { return StoreBufferOverflow; } | 83 Major MajorKey() { return StoreBufferOverflow; } |
| 85 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } | 84 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } |
| 86 }; | 85 }; |
| 87 | 86 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 value) { // One scratch reg. | 295 value) { // One scratch reg. |
| 297 ASSERT(CpuFeatures::IsSafeForSnapshot(SSE2) || fp_mode == kDontSaveFPRegs); | 296 ASSERT(CpuFeatures::IsSafeForSnapshot(SSE2) || fp_mode == kDontSaveFPRegs); |
| 298 } | 297 } |
| 299 | 298 |
| 300 enum Mode { | 299 enum Mode { |
| 301 STORE_BUFFER_ONLY, | 300 STORE_BUFFER_ONLY, |
| 302 INCREMENTAL, | 301 INCREMENTAL, |
| 303 INCREMENTAL_COMPACTION | 302 INCREMENTAL_COMPACTION |
| 304 }; | 303 }; |
| 305 | 304 |
| 306 virtual bool IsPregenerated(Isolate* isolate) V8_OVERRIDE; | |
| 307 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | |
| 308 virtual bool SometimesSetsUpAFrame() { return false; } | 305 virtual bool SometimesSetsUpAFrame() { return false; } |
| 309 | 306 |
| 310 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. | 307 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. |
| 311 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. | 308 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. |
| 312 | 309 |
| 313 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. | 310 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. |
| 314 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. | 311 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. |
| 315 | 312 |
| 316 static Mode GetMode(Code* stub) { | 313 static Mode GetMode(Code* stub) { |
| 317 byte first_instruction = stub->instruction_start()[0]; | 314 byte first_instruction = stub->instruction_start()[0]; |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 Register address_; | 532 Register address_; |
| 536 RememberedSetAction remembered_set_action_; | 533 RememberedSetAction remembered_set_action_; |
| 537 SaveFPRegsMode save_fp_regs_mode_; | 534 SaveFPRegsMode save_fp_regs_mode_; |
| 538 RegisterAllocation regs_; | 535 RegisterAllocation regs_; |
| 539 }; | 536 }; |
| 540 | 537 |
| 541 | 538 |
| 542 } } // namespace v8::internal | 539 } } // namespace v8::internal |
| 543 | 540 |
| 544 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 541 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
| OLD | NEW |