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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 | 1201 |
1202 void EndBlockGrowBuffer() { | 1202 void EndBlockGrowBuffer() { |
1203 DCHECK(block_buffer_growth_); | 1203 DCHECK(block_buffer_growth_); |
1204 block_buffer_growth_ = false; | 1204 block_buffer_growth_ = false; |
1205 } | 1205 } |
1206 | 1206 |
1207 bool is_buffer_growth_blocked() const { | 1207 bool is_buffer_growth_blocked() const { |
1208 return block_buffer_growth_; | 1208 return block_buffer_growth_; |
1209 } | 1209 } |
1210 | 1210 |
| 1211 inline void CheckTrampolinePoolQuick(int extra_instructions = 0); |
| 1212 |
1211 private: | 1213 private: |
1212 inline static void set_target_internal_reference_encoded_at(Address pc, | 1214 inline static void set_target_internal_reference_encoded_at(Address pc, |
1213 Address target); | 1215 Address target); |
1214 | 1216 |
1215 // Buffer size and constant pool distance are checked together at regular | 1217 // Buffer size and constant pool distance are checked together at regular |
1216 // intervals of kBufferCheckInterval emitted bytes. | 1218 // intervals of kBufferCheckInterval emitted bytes. |
1217 static const int kBufferCheckInterval = 1*KB/2; | 1219 static const int kBufferCheckInterval = 1*KB/2; |
1218 | 1220 |
1219 // Code generation. | 1221 // Code generation. |
1220 // The relocation writer's position is at least kGap bytes below the end of | 1222 // The relocation writer's position is at least kGap bytes below the end of |
(...skipping 30 matching lines...) Expand all Loading... |
1251 int last_bound_pos_; | 1253 int last_bound_pos_; |
1252 | 1254 |
1253 // Readable constants for compact branch handling in emit() | 1255 // Readable constants for compact branch handling in emit() |
1254 enum class CompactBranchType : bool { NO = false, COMPACT_BRANCH = true }; | 1256 enum class CompactBranchType : bool { NO = false, COMPACT_BRANCH = true }; |
1255 | 1257 |
1256 // Code emission. | 1258 // Code emission. |
1257 inline void CheckBuffer(); | 1259 inline void CheckBuffer(); |
1258 void GrowBuffer(); | 1260 void GrowBuffer(); |
1259 inline void emit(Instr x, | 1261 inline void emit(Instr x, |
1260 CompactBranchType is_compact_branch = CompactBranchType::NO); | 1262 CompactBranchType is_compact_branch = CompactBranchType::NO); |
1261 inline void CheckTrampolinePoolQuick(int extra_instructions = 0); | |
1262 | 1263 |
1263 // Instruction generation. | 1264 // Instruction generation. |
1264 // We have 3 different kind of encoding layout on MIPS. | 1265 // We have 3 different kind of encoding layout on MIPS. |
1265 // However due to many different types of objects encoded in the same fields | 1266 // However due to many different types of objects encoded in the same fields |
1266 // we have quite a few aliases for each mode. | 1267 // we have quite a few aliases for each mode. |
1267 // Using the same structure to refer to Register and FPURegister would spare a | 1268 // Using the same structure to refer to Register and FPURegister would spare a |
1268 // few aliases, but mixing both does not look clean to me. | 1269 // few aliases, but mixing both does not look clean to me. |
1269 // Anyway we could surely implement this differently. | 1270 // Anyway we could surely implement this differently. |
1270 | 1271 |
1271 void GenInstrRegister(Opcode opcode, | 1272 void GenInstrRegister(Opcode opcode, |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 public: | 1429 public: |
1429 explicit EnsureSpace(Assembler* assembler) { | 1430 explicit EnsureSpace(Assembler* assembler) { |
1430 assembler->CheckBuffer(); | 1431 assembler->CheckBuffer(); |
1431 } | 1432 } |
1432 }; | 1433 }; |
1433 | 1434 |
1434 } // namespace internal | 1435 } // namespace internal |
1435 } // namespace v8 | 1436 } // namespace v8 |
1436 | 1437 |
1437 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 1438 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
OLD | NEW |