Commit 5d72955a authored by Benedikt Meurer's avatar Benedikt Meurer

[arm] Assembler support for internal references.

BUG=v8:3872
LOG=n
R=verwaest@chromium.org

Committed: https://chromium.googlesource.com/v8/v8/+/49cbe537e715c960fb9773af2e240133726f465b

Review URL: https://codereview.chromium.org/887073007

Cr-Commit-Position: refs/heads/master@{#26476}
parent 49cbe537
...@@ -808,7 +808,7 @@ int Assembler::target_at(int pos) { ...@@ -808,7 +808,7 @@ int Assembler::target_at(int pos) {
return pos + kPcLoadDelta + imm26; return pos + kPcLoadDelta + imm26;
} }
// Internal reference to the label. // Internal reference to the label.
DCHECK_EQ(15 * B28 | 7 * B25 | 1 * B0, instr & (15 * B28 | 7 * B25 | 1 * B0)); DCHECK_EQ(7 * B25 | 1 * B0, instr & (7 * B25 | 1 * B0));
int imm26 = (((instr >> 1) & kImm24Mask) << 8) >> 6; int imm26 = (((instr >> 1) & kImm24Mask) << 8) >> 6;
return pos + imm26; return pos + imm26;
} }
...@@ -901,7 +901,7 @@ void Assembler::target_at_put(int pos, int target_pos) { ...@@ -901,7 +901,7 @@ void Assembler::target_at_put(int pos, int target_pos) {
return; return;
} }
// Patch internal reference to label. // Patch internal reference to label.
DCHECK_EQ(15 * B28 | 7 * B25 | 1 * B0, instr & (15 * B28 | 7 * B25 | 1 * B0)); DCHECK_EQ(7 * B25 | 1 * B0, instr & (7 * B25 | 1 * B0));
instr_at_put(pos, reinterpret_cast<Instr>(buffer_ + target_pos)); instr_at_put(pos, reinterpret_cast<Instr>(buffer_ + target_pos));
} }
...@@ -3516,9 +3516,9 @@ void Assembler::dd(Label* label) { ...@@ -3516,9 +3516,9 @@ void Assembler::dd(Label* label) {
DCHECK_EQ(0, imm26 & 3); DCHECK_EQ(0, imm26 & 3);
int imm24 = imm26 >> 2; int imm24 = imm26 >> 2;
DCHECK(is_int24(imm24)); DCHECK(is_int24(imm24));
// We use bit pattern 1111111<imm24>1 because that doesn't match any branch // We use bit pattern 0000111<imm24>1 because that doesn't match any branch
// or load that would also appear on the label chain. // or load that would also appear on the label chain.
emit(15 * B28 | 7 * B25 | ((imm24 & kImm24Mask) << 1) | 1 * B0); emit(7 * B25 | ((imm24 & kImm24Mask) << 1) | 1 * B0);
} }
} }
......
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