OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 bool IsEnabled(CpuFeature f) { | 75 bool IsEnabled(CpuFeature f) { |
76 return (enabled_cpu_features_ & (static_cast<uint64_t>(1) << f)) != 0; | 76 return (enabled_cpu_features_ & (static_cast<uint64_t>(1) << f)) != 0; |
77 } | 77 } |
78 | 78 |
79 // Overwrite a host NaN with a quiet target NaN. Used by mksnapshot for | 79 // Overwrite a host NaN with a quiet target NaN. Used by mksnapshot for |
80 // cross-snapshotting. | 80 // cross-snapshotting. |
81 static void QuietNaN(HeapObject* nan) { } | 81 static void QuietNaN(HeapObject* nan) { } |
82 | 82 |
83 int pc_offset() const { return static_cast<int>(pc_ - buffer_); } | 83 int pc_offset() const { return static_cast<int>(pc_ - buffer_); } |
84 | 84 |
| 85 // This function is called when code generation is aborted, so that |
| 86 // the assembler could clean up internal data structures. |
| 87 virtual void AbortedCodeGeneration() { } |
| 88 |
85 static const int kMinimalBufferSize = 4*KB; | 89 static const int kMinimalBufferSize = 4*KB; |
86 | 90 |
87 protected: | 91 protected: |
88 // The buffer into which code and relocation info are generated. It could | 92 // The buffer into which code and relocation info are generated. It could |
89 // either be owned by the assembler or be provided externally. | 93 // either be owned by the assembler or be provided externally. |
90 byte* buffer_; | 94 byte* buffer_; |
91 int buffer_size_; | 95 int buffer_size_; |
92 bool own_buffer_; | 96 bool own_buffer_; |
93 | 97 |
94 // The program counter, which points into the buffer above and moves forward. | 98 // The program counter, which points into the buffer above and moves forward. |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 | 1081 |
1078 private: | 1082 private: |
1079 int32_t multiplier_; | 1083 int32_t multiplier_; |
1080 int32_t shift_; | 1084 int32_t shift_; |
1081 }; | 1085 }; |
1082 | 1086 |
1083 | 1087 |
1084 } } // namespace v8::internal | 1088 } } // namespace v8::internal |
1085 | 1089 |
1086 #endif // V8_ASSEMBLER_H_ | 1090 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |