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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 set_target_address_at( | 544 set_target_address_at( |
545 instruction_payload - kInstructionsFor32BitConstant * kInstrSize, | 545 instruction_payload - kInstructionsFor32BitConstant * kInstrSize, |
546 code, | 546 code, |
547 target); | 547 target); |
548 } | 548 } |
549 | 549 |
550 // This sets the internal reference at the pc. | 550 // This sets the internal reference at the pc. |
551 inline static void deserialization_set_target_internal_reference_at( | 551 inline static void deserialization_set_target_internal_reference_at( |
552 Address pc, Address target); | 552 Address pc, Address target); |
553 | 553 |
| 554 // This sets the encoded internal reference at the pc. |
| 555 inline static void deserialization_set_target_internal_reference_encoded_at( |
| 556 Address pc, Address target); |
| 557 |
554 // Size of an instruction. | 558 // Size of an instruction. |
555 static const int kInstrSize = sizeof(Instr); | 559 static const int kInstrSize = sizeof(Instr); |
556 | 560 |
557 // Difference between address of current opcode and target address offset. | 561 // Difference between address of current opcode and target address offset. |
558 static const int kBranchPCOffset = 4; | 562 static const int kBranchPCOffset = 4; |
559 | 563 |
560 // Here we are patching the address in the LUI/ORI instruction pair. | 564 // Here we are patching the address in the LUI/ORI instruction pair. |
561 // These values are used in the serialization process and must be zero for | 565 // These values are used in the serialization process and must be zero for |
562 // MIPS platform, as Code, Embedded Object or External-reference pointers | 566 // MIPS platform, as Code, Embedded Object or External-reference pointers |
563 // are split across two consecutive instructions and don't exist separately | 567 // are split across two consecutive instructions and don't exist separately |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1184 void EndBlockGrowBuffer() { | 1188 void EndBlockGrowBuffer() { |
1185 DCHECK(block_buffer_growth_); | 1189 DCHECK(block_buffer_growth_); |
1186 block_buffer_growth_ = false; | 1190 block_buffer_growth_ = false; |
1187 } | 1191 } |
1188 | 1192 |
1189 bool is_buffer_growth_blocked() const { | 1193 bool is_buffer_growth_blocked() const { |
1190 return block_buffer_growth_; | 1194 return block_buffer_growth_; |
1191 } | 1195 } |
1192 | 1196 |
1193 private: | 1197 private: |
| 1198 inline static void set_target_internal_reference_encoded_at(Address pc, |
| 1199 Address target); |
| 1200 |
1194 // Buffer size and constant pool distance are checked together at regular | 1201 // Buffer size and constant pool distance are checked together at regular |
1195 // intervals of kBufferCheckInterval emitted bytes. | 1202 // intervals of kBufferCheckInterval emitted bytes. |
1196 static const int kBufferCheckInterval = 1*KB/2; | 1203 static const int kBufferCheckInterval = 1*KB/2; |
1197 | 1204 |
1198 // Code generation. | 1205 // Code generation. |
1199 // The relocation writer's position is at least kGap bytes below the end of | 1206 // The relocation writer's position is at least kGap bytes below the end of |
1200 // the generated instructions. This is so that multi-instruction sequences do | 1207 // the generated instructions. This is so that multi-instruction sequences do |
1201 // not have to check for overflow. The same is true for writes of large | 1208 // not have to check for overflow. The same is true for writes of large |
1202 // relocation info entries. | 1209 // relocation info entries. |
1203 static const int kGap = 32; | 1210 static const int kGap = 32; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 class EnsureSpace BASE_EMBEDDED { | 1401 class EnsureSpace BASE_EMBEDDED { |
1395 public: | 1402 public: |
1396 explicit EnsureSpace(Assembler* assembler) { | 1403 explicit EnsureSpace(Assembler* assembler) { |
1397 assembler->CheckBuffer(); | 1404 assembler->CheckBuffer(); |
1398 } | 1405 } |
1399 }; | 1406 }; |
1400 | 1407 |
1401 } } // namespace v8::internal | 1408 } } // namespace v8::internal |
1402 | 1409 |
1403 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 1410 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
OLD | NEW |