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 class StoreBufferOverflowStub: public PlatformCodeStub { | 64 class StoreBufferOverflowStub: public PlatformCodeStub { |
65 public: | 65 public: |
66 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) | 66 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) |
67 : save_doubles_(save_fp) { } | 67 : save_doubles_(save_fp) { } |
68 | 68 |
69 void Generate(MacroAssembler* masm); | 69 void Generate(MacroAssembler* masm); |
70 | 70 |
71 virtual bool IsPregenerated() { return true; } | 71 virtual bool IsPregenerated() { return true; } |
72 static void GenerateFixedRegStubsAheadOfTime(); | 72 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); |
73 virtual bool SometimesSetsUpAFrame() { return false; } | 73 virtual bool SometimesSetsUpAFrame() { return false; } |
74 | 74 |
75 private: | 75 private: |
76 SaveFPRegsMode save_doubles_; | 76 SaveFPRegsMode save_doubles_; |
77 | 77 |
78 Major MajorKey() { return StoreBufferOverflow; } | 78 Major MajorKey() { return StoreBufferOverflow; } |
79 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } | 79 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } |
80 }; | 80 }; |
81 | 81 |
82 | 82 |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 value) { // One scratch reg. | 399 value) { // One scratch reg. |
400 } | 400 } |
401 | 401 |
402 enum Mode { | 402 enum Mode { |
403 STORE_BUFFER_ONLY, | 403 STORE_BUFFER_ONLY, |
404 INCREMENTAL, | 404 INCREMENTAL, |
405 INCREMENTAL_COMPACTION | 405 INCREMENTAL_COMPACTION |
406 }; | 406 }; |
407 | 407 |
408 virtual bool IsPregenerated(); | 408 virtual bool IsPregenerated(); |
409 static void GenerateFixedRegStubsAheadOfTime(); | 409 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); |
410 virtual bool SometimesSetsUpAFrame() { return false; } | 410 virtual bool SometimesSetsUpAFrame() { return false; } |
411 | 411 |
412 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. | 412 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. |
413 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. | 413 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. |
414 | 414 |
415 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. | 415 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. |
416 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. | 416 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. |
417 | 417 |
418 static Mode GetMode(Code* stub) { | 418 static Mode GetMode(Code* stub) { |
419 byte first_instruction = stub->instruction_start()[0]; | 419 byte first_instruction = stub->instruction_start()[0]; |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 Register address_; | 637 Register address_; |
638 RememberedSetAction remembered_set_action_; | 638 RememberedSetAction remembered_set_action_; |
639 SaveFPRegsMode save_fp_regs_mode_; | 639 SaveFPRegsMode save_fp_regs_mode_; |
640 RegisterAllocation regs_; | 640 RegisterAllocation regs_; |
641 }; | 641 }; |
642 | 642 |
643 | 643 |
644 } } // namespace v8::internal | 644 } } // namespace v8::internal |
645 | 645 |
646 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 646 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
OLD | NEW |