Commit 64a94207 authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[Turbofan][ptr-compr][x64] Use kScratchRegister instead of a fresh one

... for decompression because the former is not used by register
allocator and therefore always available.

Bug: v8:7703
Change-Id: I72d738be69c339444311d75c69f04c104e90bb90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1533857Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60390}
parent 39e8247d
......@@ -1937,8 +1937,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
}
case kX64MovqDecompressAnyTagged: {
CHECK(instr->HasOutput());
__ DecompressAnyTagged(i.OutputRegister(), i.MemoryOperand(),
i.TempRegister(0));
__ DecompressAnyTagged(i.OutputRegister(), i.MemoryOperand());
break;
}
case kX64MovqCompressTagged: {
......
......@@ -351,12 +351,6 @@ void InstructionSelector::VisitLoad(Node* node) {
X64OperandGenerator g(this);
ArchOpcode opcode = GetLoadOpcode(load_rep);
size_t temp_count = 0;
InstructionOperand temps[1];
if (COMPRESS_POINTERS_BOOL && opcode == kX64MovqDecompressAnyTagged) {
temps[temp_count++] = g.TempRegister();
}
DCHECK_LE(temp_count, arraysize(temps));
InstructionOperand outputs[] = {g.DefineAsRegister(node)};
InstructionOperand inputs[3];
size_t input_count = 0;
......@@ -369,7 +363,7 @@ void InstructionSelector::VisitLoad(Node* node) {
CHECK_NE(poisoning_level_, PoisoningMitigationLevel::kDontPoison);
code |= MiscField::encode(kMemoryAccessPoisoned);
}
Emit(code, 1, outputs, input_count, inputs, temp_count, temps);
Emit(code, 1, outputs, input_count, inputs);
}
void InstructionSelector::VisitPoisonedLoad(Node* node) { VisitLoad(node); }
......
......@@ -484,7 +484,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
// When pointer compression is enabled, uses |scratch| to decompress the
// value.
void LoadAnyTaggedField(Register destination, Operand field_operand,
Register scratch);
Register scratch = kScratchRegister);
// Loads a field containing a HeapObject, decompresses it if necessary and
// pushes full pointer to the stack. When pointer compression is enabled,
......@@ -509,7 +509,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void DecompressTaggedSigned(Register destination, Operand field_operand);
void DecompressTaggedPointer(Register destination, Operand field_operand);
void DecompressAnyTagged(Register destination, Operand field_operand,
Register scratch);
Register scratch = kScratchRegister);
protected:
static const int kSmiShift = kSmiTagSize + kSmiShiftSize;
......
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