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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 address, // An input reg. | 285 address, // An input reg. |
287 value) { // One scratch reg. | 286 value) { // One scratch reg. |
288 } | 287 } |
289 | 288 |
290 enum Mode { | 289 enum Mode { |
291 STORE_BUFFER_ONLY, | 290 STORE_BUFFER_ONLY, |
292 INCREMENTAL, | 291 INCREMENTAL, |
293 INCREMENTAL_COMPACTION | 292 INCREMENTAL_COMPACTION |
294 }; | 293 }; |
295 | 294 |
296 virtual bool IsPregenerated(Isolate* isolate) V8_OVERRIDE; | |
297 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); | |
298 virtual bool SometimesSetsUpAFrame() { return false; } | 295 virtual bool SometimesSetsUpAFrame() { return false; } |
299 | 296 |
300 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. | 297 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. |
301 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. | 298 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. |
302 | 299 |
303 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. | 300 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. |
304 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. | 301 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. |
305 | 302 |
306 static Mode GetMode(Code* stub) { | 303 static Mode GetMode(Code* stub) { |
307 byte first_instruction = stub->instruction_start()[0]; | 304 byte first_instruction = stub->instruction_start()[0]; |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 RememberedSetAction remembered_set_action_; | 503 RememberedSetAction remembered_set_action_; |
507 SaveFPRegsMode save_fp_regs_mode_; | 504 SaveFPRegsMode save_fp_regs_mode_; |
508 Label slow_; | 505 Label slow_; |
509 RegisterAllocation regs_; | 506 RegisterAllocation regs_; |
510 }; | 507 }; |
511 | 508 |
512 | 509 |
513 } } // namespace v8::internal | 510 } } // namespace v8::internal |
514 | 511 |
515 #endif // V8_X64_CODE_STUBS_X64_H_ | 512 #endif // V8_X64_CODE_STUBS_X64_H_ |
OLD | NEW |