| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 // Return true if this is a register operand. | 331 // Return true if this is a register operand. |
| 332 INLINE(bool is_reg() const); | 332 INLINE(bool is_reg() const); |
| 333 | 333 |
| 334 inline int32_t immediate() const { | 334 inline int32_t immediate() const { |
| 335 DCHECK(!is_reg()); | 335 DCHECK(!is_reg()); |
| 336 return imm32_; | 336 return imm32_; |
| 337 } | 337 } |
| 338 | 338 |
| 339 Register rm() const { return rm_; } | 339 Register rm() const { return rm_; } |
| 340 | 340 |
| 341 RelocInfo::Mode rmode() const { return rmode_; } |
| 342 |
| 341 private: | 343 private: |
| 342 Register rm_; | 344 Register rm_; |
| 343 int32_t imm32_; // Valid if rm_ == no_reg. | 345 int32_t imm32_; // Valid if rm_ == no_reg. |
| 344 RelocInfo::Mode rmode_; | 346 RelocInfo::Mode rmode_; |
| 345 | 347 |
| 346 friend class Assembler; | 348 friend class Assembler; |
| 347 friend class MacroAssembler; | 349 friend class MacroAssembler; |
| 348 }; | 350 }; |
| 349 | 351 |
| 350 | 352 |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 ConstantPoolEntry::Access access, | 1167 ConstantPoolEntry::Access access, |
| 1166 ConstantPoolEntry::Type type) { | 1168 ConstantPoolEntry::Type type) { |
| 1167 // No embedded constant pool support. | 1169 // No embedded constant pool support. |
| 1168 UNREACHABLE(); | 1170 UNREACHABLE(); |
| 1169 } | 1171 } |
| 1170 | 1172 |
| 1171 bool IsPrevInstrCompactBranch() { return prev_instr_compact_branch_; } | 1173 bool IsPrevInstrCompactBranch() { return prev_instr_compact_branch_; } |
| 1172 | 1174 |
| 1173 inline int UnboundLabelsCount() { return unbound_labels_count_; } | 1175 inline int UnboundLabelsCount() { return unbound_labels_count_; } |
| 1174 | 1176 |
| 1177 // Say if we need to relocate with this mode. |
| 1178 bool MustUseReg(RelocInfo::Mode rmode); |
| 1179 |
| 1180 // Record reloc info for current pc_. |
| 1181 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); |
| 1182 |
| 1175 protected: | 1183 protected: |
| 1176 // Load Scaled Address instruction. | 1184 // Load Scaled Address instruction. |
| 1177 void lsa(Register rd, Register rt, Register rs, uint8_t sa); | 1185 void lsa(Register rd, Register rt, Register rs, uint8_t sa); |
| 1178 | 1186 |
| 1179 // Helpers. | 1187 // Helpers. |
| 1180 void LoadRegPlusOffsetToAt(const MemOperand& src); | 1188 void LoadRegPlusOffsetToAt(const MemOperand& src); |
| 1181 int32_t LoadRegPlusUpperOffsetPartToAt(const MemOperand& src); | 1189 int32_t LoadRegPlusUpperOffsetPartToAt(const MemOperand& src); |
| 1182 int32_t LoadUpperOffsetForTwoMemoryAccesses(const MemOperand& src); | 1190 int32_t LoadUpperOffsetForTwoMemoryAccesses(const MemOperand& src); |
| 1183 | 1191 |
| 1184 // Relocation for a type-recording IC has the AST id added to it. This | 1192 // Relocation for a type-recording IC has the AST id added to it. This |
| 1185 // member variable is a way to pass the information from the call site to | 1193 // member variable is a way to pass the information from the call site to |
| 1186 // the relocation info. | 1194 // the relocation info. |
| 1187 TypeFeedbackId recorded_ast_id_; | 1195 TypeFeedbackId recorded_ast_id_; |
| 1188 | 1196 |
| 1189 int32_t buffer_space() const { return reloc_info_writer.pos() - pc_; } | 1197 int32_t buffer_space() const { return reloc_info_writer.pos() - pc_; } |
| 1190 | 1198 |
| 1191 // Decode branch instruction at pos and return branch target pos. | 1199 // Decode branch instruction at pos and return branch target pos. |
| 1192 int target_at(int pos, bool is_internal); | 1200 int target_at(int pos, bool is_internal); |
| 1193 | 1201 |
| 1194 // Patch branch instruction at pos to branch to given branch target pos. | 1202 // Patch branch instruction at pos to branch to given branch target pos. |
| 1195 void target_at_put(int pos, int target_pos, bool is_internal); | 1203 void target_at_put(int pos, int target_pos, bool is_internal); |
| 1196 | 1204 |
| 1197 // Say if we need to relocate with this mode. | |
| 1198 bool MustUseReg(RelocInfo::Mode rmode); | |
| 1199 | |
| 1200 // Record reloc info for current pc_. | |
| 1201 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); | |
| 1202 | |
| 1203 // Block the emission of the trampoline pool before pc_offset. | 1205 // Block the emission of the trampoline pool before pc_offset. |
| 1204 void BlockTrampolinePoolBefore(int pc_offset) { | 1206 void BlockTrampolinePoolBefore(int pc_offset) { |
| 1205 if (no_trampoline_pool_before_ < pc_offset) | 1207 if (no_trampoline_pool_before_ < pc_offset) |
| 1206 no_trampoline_pool_before_ = pc_offset; | 1208 no_trampoline_pool_before_ = pc_offset; |
| 1207 } | 1209 } |
| 1208 | 1210 |
| 1209 void StartBlockTrampolinePool() { | 1211 void StartBlockTrampolinePool() { |
| 1210 trampoline_pool_blocked_nesting_++; | 1212 trampoline_pool_blocked_nesting_++; |
| 1211 } | 1213 } |
| 1212 | 1214 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 public: | 1477 public: |
| 1476 explicit EnsureSpace(Assembler* assembler) { | 1478 explicit EnsureSpace(Assembler* assembler) { |
| 1477 assembler->CheckBuffer(); | 1479 assembler->CheckBuffer(); |
| 1478 } | 1480 } |
| 1479 }; | 1481 }; |
| 1480 | 1482 |
| 1481 } // namespace internal | 1483 } // namespace internal |
| 1482 } // namespace v8 | 1484 } // namespace v8 |
| 1483 | 1485 |
| 1484 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 1486 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
| OLD | NEW |