| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 | 62 |
| 63 class StoreBufferOverflowStub: public PlatformCodeStub { | 63 class StoreBufferOverflowStub: public PlatformCodeStub { |
| 64 public: | 64 public: |
| 65 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) | 65 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) |
| 66 : save_doubles_(save_fp) { } | 66 : save_doubles_(save_fp) { } |
| 67 | 67 |
| 68 void Generate(MacroAssembler* masm); | 68 void Generate(MacroAssembler* masm); |
| 69 | 69 |
| 70 virtual bool IsPregenerated() { return true; } | 70 virtual bool IsPregenerated() { return true; } |
| 71 static void GenerateFixedRegStubsAheadOfTime(); | 71 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); |
| 72 virtual bool SometimesSetsUpAFrame() { return false; } | 72 virtual bool SometimesSetsUpAFrame() { return false; } |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 SaveFPRegsMode save_doubles_; | 75 SaveFPRegsMode save_doubles_; |
| 76 | 76 |
| 77 Major MajorKey() { return StoreBufferOverflow; } | 77 Major MajorKey() { return StoreBufferOverflow; } |
| 78 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } | 78 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 | 81 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 value) { // One scratch reg. | 395 value) { // One scratch reg. |
| 396 } | 396 } |
| 397 | 397 |
| 398 enum Mode { | 398 enum Mode { |
| 399 STORE_BUFFER_ONLY, | 399 STORE_BUFFER_ONLY, |
| 400 INCREMENTAL, | 400 INCREMENTAL, |
| 401 INCREMENTAL_COMPACTION | 401 INCREMENTAL_COMPACTION |
| 402 }; | 402 }; |
| 403 | 403 |
| 404 virtual bool IsPregenerated(); | 404 virtual bool IsPregenerated(); |
| 405 static void GenerateFixedRegStubsAheadOfTime(); | 405 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); |
| 406 virtual bool SometimesSetsUpAFrame() { return false; } | 406 virtual bool SometimesSetsUpAFrame() { return false; } |
| 407 | 407 |
| 408 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. | 408 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. |
| 409 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. | 409 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. |
| 410 | 410 |
| 411 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. | 411 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. |
| 412 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. | 412 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. |
| 413 | 413 |
| 414 static Mode GetMode(Code* stub) { | 414 static Mode GetMode(Code* stub) { |
| 415 byte first_instruction = stub->instruction_start()[0]; | 415 byte first_instruction = stub->instruction_start()[0]; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 RememberedSetAction remembered_set_action_; | 614 RememberedSetAction remembered_set_action_; |
| 615 SaveFPRegsMode save_fp_regs_mode_; | 615 SaveFPRegsMode save_fp_regs_mode_; |
| 616 Label slow_; | 616 Label slow_; |
| 617 RegisterAllocation regs_; | 617 RegisterAllocation regs_; |
| 618 }; | 618 }; |
| 619 | 619 |
| 620 | 620 |
| 621 } } // namespace v8::internal | 621 } } // namespace v8::internal |
| 622 | 622 |
| 623 #endif // V8_X64_CODE_STUBS_X64_H_ | 623 #endif // V8_X64_CODE_STUBS_X64_H_ |
| OLD | NEW |