Commit 5ecff4fe authored by Yu Yin's avatar Yu Yin Committed by Commit Bot

[mips] Correct function assembler::db/dd/dq

All these functions need to do is just write the value to the memory,
but EmitHelper will do something more than this, EmitHelper will check
if it need generate trampoline code while code generating and it will
insert trampoline code at current pc offset, this means there maybe have
trampoline code between two consecutive dd()'s target memory(pc), this
is not we want.

Change-Id: I5537f133be78aabdc4d53d4de07f388fa50f4a64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224963
Commit-Queue: Yu Yin <xwafish@gmail.com>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68188}
parent e8ff9fb0
......@@ -3568,17 +3568,20 @@ void Assembler::GrowBuffer() {
void Assembler::db(uint8_t data) {
CheckForEmitInForbiddenSlot();
EmitHelper(data);
*reinterpret_cast<uint8_t*>(pc_) = data;
pc_ += sizeof(uint8_t);
}
void Assembler::dd(uint32_t data) {
CheckForEmitInForbiddenSlot();
EmitHelper(data);
*reinterpret_cast<uint32_t*>(pc_) = data;
pc_ += sizeof(uint32_t);
}
void Assembler::dq(uint64_t data) {
CheckForEmitInForbiddenSlot();
EmitHelper(data);
*reinterpret_cast<uint64_t*>(pc_) = data;
pc_ += sizeof(uint64_t);
}
void Assembler::dd(Label* label) {
......
......@@ -3763,17 +3763,20 @@ void Assembler::GrowBuffer() {
void Assembler::db(uint8_t data) {
CheckForEmitInForbiddenSlot();
EmitHelper(data);
*reinterpret_cast<uint8_t*>(pc_) = data;
pc_ += sizeof(uint8_t);
}
void Assembler::dd(uint32_t data) {
CheckForEmitInForbiddenSlot();
EmitHelper(data);
*reinterpret_cast<uint32_t*>(pc_) = data;
pc_ += sizeof(uint32_t);
}
void Assembler::dq(uint64_t data) {
CheckForEmitInForbiddenSlot();
EmitHelper(data);
*reinterpret_cast<uint64_t*>(pc_) = data;
pc_ += sizeof(uint64_t);
}
void Assembler::dd(Label* label) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment