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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 set_target_address_at( | 537 set_target_address_at( |
538 instruction_payload - kInstructionsFor64BitConstant * kInstrSize, | 538 instruction_payload - kInstructionsFor64BitConstant * kInstrSize, |
539 code, | 539 code, |
540 target); | 540 target); |
541 } | 541 } |
542 | 542 |
543 // This sets the internal reference at the pc. | 543 // This sets the internal reference at the pc. |
544 inline static void deserialization_set_target_internal_reference_at( | 544 inline static void deserialization_set_target_internal_reference_at( |
545 Address pc, Address target); | 545 Address pc, Address target); |
546 | 546 |
| 547 // This sets the encoded internal reference at the pc. |
| 548 inline static void deserialization_set_target_internal_reference_encoded_at( |
| 549 Address pc, Address target); |
| 550 |
547 // Size of an instruction. | 551 // Size of an instruction. |
548 static const int kInstrSize = sizeof(Instr); | 552 static const int kInstrSize = sizeof(Instr); |
549 | 553 |
550 // Difference between address of current opcode and target address offset. | 554 // Difference between address of current opcode and target address offset. |
551 static const int kBranchPCOffset = 4; | 555 static const int kBranchPCOffset = 4; |
552 | 556 |
553 // Here we are patching the address in the LUI/ORI instruction pair. | 557 // Here we are patching the address in the LUI/ORI instruction pair. |
554 // These values are used in the serialization process and must be zero for | 558 // These values are used in the serialization process and must be zero for |
555 // MIPS platform, as Code, Embedded Object or External-reference pointers | 559 // MIPS platform, as Code, Embedded Object or External-reference pointers |
556 // are split across two consecutive instructions and don't exist separately | 560 // are split across two consecutive instructions and don't exist separately |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 | 1169 |
1166 // Generate the constant pool for the generated code. | 1170 // Generate the constant pool for the generated code. |
1167 void PopulateConstantPool(ConstantPoolArray* constant_pool); | 1171 void PopulateConstantPool(ConstantPoolArray* constant_pool); |
1168 | 1172 |
1169 protected: | 1173 protected: |
1170 // Relocation for a type-recording IC has the AST id added to it. This | 1174 // Relocation for a type-recording IC has the AST id added to it. This |
1171 // member variable is a way to pass the information from the call site to | 1175 // member variable is a way to pass the information from the call site to |
1172 // the relocation info. | 1176 // the relocation info. |
1173 TypeFeedbackId recorded_ast_id_; | 1177 TypeFeedbackId recorded_ast_id_; |
1174 | 1178 |
| 1179 inline static void set_target_internal_reference_encoded_at(Address pc, |
| 1180 Address target); |
| 1181 |
1175 int64_t buffer_space() const { return reloc_info_writer.pos() - pc_; } | 1182 int64_t buffer_space() const { return reloc_info_writer.pos() - pc_; } |
1176 | 1183 |
1177 // Decode branch instruction at pos and return branch target pos. | 1184 // Decode branch instruction at pos and return branch target pos. |
1178 int target_at(int pos, bool is_internal); | 1185 int target_at(int pos, bool is_internal); |
1179 | 1186 |
1180 // Patch branch instruction at pos to branch to given branch target pos. | 1187 // Patch branch instruction at pos to branch to given branch target pos. |
1181 void target_at_put(int pos, int target_pos, bool is_internal); | 1188 void target_at_put(int pos, int target_pos, bool is_internal); |
1182 | 1189 |
1183 // Say if we need to relocate with this mode. | 1190 // Say if we need to relocate with this mode. |
1184 bool MustUseReg(RelocInfo::Mode rmode); | 1191 bool MustUseReg(RelocInfo::Mode rmode); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1434 class EnsureSpace BASE_EMBEDDED { | 1441 class EnsureSpace BASE_EMBEDDED { |
1435 public: | 1442 public: |
1436 explicit EnsureSpace(Assembler* assembler) { | 1443 explicit EnsureSpace(Assembler* assembler) { |
1437 assembler->CheckBuffer(); | 1444 assembler->CheckBuffer(); |
1438 } | 1445 } |
1439 }; | 1446 }; |
1440 | 1447 |
1441 } } // namespace v8::internal | 1448 } } // namespace v8::internal |
1442 | 1449 |
1443 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 1450 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
OLD | NEW |