Index: src/mips64/assembler-mips64.cc |
diff --git a/src/mips64/assembler-mips64.cc b/src/mips64/assembler-mips64.cc |
index a012e7b267a897823682d02266649994e703d23e..9c313a18d696eecb165bcc095da403ce663f24b3 100644 |
--- a/src/mips64/assembler-mips64.cc |
+++ b/src/mips64/assembler-mips64.cc |
@@ -3175,46 +3175,34 @@ void Assembler::GrowBuffer() { |
void Assembler::db(uint8_t data) { |
- CheckBuffer(); |
- *reinterpret_cast<uint8_t*>(pc_) = data; |
- pc_ += sizeof(uint8_t); |
+ CheckForEmitInForbiddenSlot(); |
+ EmitHelper(data); |
} |
void Assembler::dd(uint32_t data) { |
- CheckBuffer(); |
- *reinterpret_cast<uint32_t*>(pc_) = data; |
- pc_ += sizeof(uint32_t); |
+ CheckForEmitInForbiddenSlot(); |
+ EmitHelper(data); |
} |
void Assembler::dq(uint64_t data) { |
- CheckBuffer(); |
- *reinterpret_cast<uint64_t*>(pc_) = data; |
- pc_ += sizeof(uint64_t); |
+ CheckForEmitInForbiddenSlot(); |
+ EmitHelper(data); |
} |
void Assembler::dd(Label* label) { |
- CheckBuffer(); |
- RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); |
uint64_t data; |
+ CheckForEmitInForbiddenSlot(); |
if (label->is_bound()) { |
data = reinterpret_cast<uint64_t>(buffer_ + label->pos()); |
} else { |
data = jump_address(label); |
internal_reference_positions_.insert(label->pos()); |
} |
- *reinterpret_cast<uint64_t*>(pc_) = data; |
- pc_ += sizeof(uint64_t); |
-} |
- |
- |
-void Assembler::emit_code_stub_address(Code* stub) { |
- CheckBuffer(); |
- *reinterpret_cast<uint64_t*>(pc_) = |
- reinterpret_cast<uint64_t>(stub->instruction_start()); |
- pc_ += sizeof(uint64_t); |
+ RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); |
+ EmitHelper(data); |
} |