| 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 | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are 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 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2166 reg = 3; | 2166 reg = 3; |
| 2167 break; | 2167 break; |
| 2168 default: | 2168 default: |
| 2169 UNIMPLEMENTED(); | 2169 UNIMPLEMENTED(); |
| 2170 } | 2170 } |
| 2171 return instr == (ORI | reg * B21 | reg * B16); | 2171 return instr == (ORI | reg * B21 | reg * B16); |
| 2172 } | 2172 } |
| 2173 | 2173 |
| 2174 | 2174 |
| 2175 // Debugging. | 2175 // Debugging. |
| 2176 void Assembler::RecordJSReturn() { | |
| 2177 positions_recorder()->WriteRecordedPositions(); | |
| 2178 CheckBuffer(); | |
| 2179 RecordRelocInfo(RelocInfo::JS_RETURN); | |
| 2180 } | |
| 2181 | |
| 2182 | |
| 2183 void Assembler::RecordDebugBreakSlot() { | |
| 2184 positions_recorder()->WriteRecordedPositions(); | |
| 2185 CheckBuffer(); | |
| 2186 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); | |
| 2187 } | |
| 2188 | |
| 2189 | |
| 2190 void Assembler::RecordComment(const char* msg) { | |
| 2191 if (FLAG_code_comments) { | |
| 2192 CheckBuffer(); | |
| 2193 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); | |
| 2194 } | |
| 2195 } | |
| 2196 | |
| 2197 | |
| 2198 void Assembler::RecordDeoptReason(const int reason, const int raw_position) { | |
| 2199 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling()) { | |
| 2200 EnsureSpace ensure_space(this); | |
| 2201 RecordRelocInfo(RelocInfo::POSITION, raw_position); | |
| 2202 RecordRelocInfo(RelocInfo::DEOPT_REASON, reason); | |
| 2203 } | |
| 2204 } | |
| 2205 | |
| 2206 | |
| 2207 void Assembler::GrowBuffer() { | 2176 void Assembler::GrowBuffer() { |
| 2208 if (!own_buffer_) FATAL("external code buffer is too small"); | 2177 if (!own_buffer_) FATAL("external code buffer is too small"); |
| 2209 | 2178 |
| 2210 // Compute new buffer size. | 2179 // Compute new buffer size. |
| 2211 CodeDesc desc; // the new buffer | 2180 CodeDesc desc; // the new buffer |
| 2212 if (buffer_size_ < 4 * KB) { | 2181 if (buffer_size_ < 4 * KB) { |
| 2213 desc.buffer_size = 4 * KB; | 2182 desc.buffer_size = 4 * KB; |
| 2214 } else if (buffer_size_ < 1 * MB) { | 2183 } else if (buffer_size_ < 1 * MB) { |
| 2215 desc.buffer_size = 2 * buffer_size_; | 2184 desc.buffer_size = 2 * buffer_size_; |
| 2216 } else { | 2185 } else { |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2554 | 2523 |
| 2555 // Patch load instruction with correct offset. | 2524 // Patch load instruction with correct offset. |
| 2556 Assembler::SetConstantPoolOffset(rinfo.pc(), offset); | 2525 Assembler::SetConstantPoolOffset(rinfo.pc(), offset); |
| 2557 } | 2526 } |
| 2558 } | 2527 } |
| 2559 #endif | 2528 #endif |
| 2560 } | 2529 } |
| 2561 } // namespace v8::internal | 2530 } // namespace v8::internal |
| 2562 | 2531 |
| 2563 #endif // V8_TARGET_ARCH_PPC | 2532 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |