OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 }; | 60 }; |
61 | 61 |
62 | 62 |
63 class StoreBufferOverflowStub: public CodeStub { | 63 class StoreBufferOverflowStub: public CodeStub { |
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 CompilingCallsToThisStubIsGCSafe() { return true; } | 70 virtual bool IsPregenerated() { return true; } |
71 static void GenerateFixedRegStubsAheadOfTime(); | 71 static void GenerateFixedRegStubsAheadOfTime(); |
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 |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 address, // An input reg. | 488 address, // An input reg. |
489 value) { // One scratch reg. | 489 value) { // One scratch reg. |
490 } | 490 } |
491 | 491 |
492 enum Mode { | 492 enum Mode { |
493 STORE_BUFFER_ONLY, | 493 STORE_BUFFER_ONLY, |
494 INCREMENTAL, | 494 INCREMENTAL, |
495 INCREMENTAL_COMPACTION | 495 INCREMENTAL_COMPACTION |
496 }; | 496 }; |
497 | 497 |
498 virtual bool CompilingCallsToThisStubIsGCSafe(); | 498 virtual bool IsPregenerated(); |
499 static void GenerateFixedRegStubsAheadOfTime(); | 499 static void GenerateFixedRegStubsAheadOfTime(); |
500 virtual bool SometimesSetsUpAFrame() { return false; } | 500 virtual bool SometimesSetsUpAFrame() { return false; } |
501 | 501 |
502 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. | 502 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. |
503 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. | 503 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. |
504 | 504 |
505 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. | 505 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. |
506 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. | 506 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. |
507 | 507 |
508 static Mode GetMode(Code* stub) { | 508 static Mode GetMode(Code* stub) { |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 Register address_; | 734 Register address_; |
735 RememberedSetAction remembered_set_action_; | 735 RememberedSetAction remembered_set_action_; |
736 SaveFPRegsMode save_fp_regs_mode_; | 736 SaveFPRegsMode save_fp_regs_mode_; |
737 RegisterAllocation regs_; | 737 RegisterAllocation regs_; |
738 }; | 738 }; |
739 | 739 |
740 | 740 |
741 } } // namespace v8::internal | 741 } } // namespace v8::internal |
742 | 742 |
743 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 743 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
OLD | NEW |