Commit 1c13f233 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[ia32] Remove StaticArray operand constructor

Change-Id: Ie6606869acbeadea747c4e664c78cfbffe942321
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1273135
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56512}
parent 076b5298
...@@ -68,8 +68,9 @@ void TurboAssembler::LoadRoot(Register destination, RootIndex index) { ...@@ -68,8 +68,9 @@ void TurboAssembler::LoadRoot(Register destination, RootIndex index) {
ExternalReference roots_array_start = ExternalReference roots_array_start =
ExternalReference::roots_array_start(isolate()); ExternalReference::roots_array_start(isolate());
mov(destination, Immediate(static_cast<int>(index))); mov(destination, Immediate(static_cast<int>(index)));
mov(destination, lea(destination,
StaticArray(destination, times_pointer_size, roots_array_start)); Operand(destination, times_pointer_size, roots_array_start.address(),
RelocInfo::EXTERNAL_REFERENCE));
} }
void MacroAssembler::CompareRoot(Register with, Register scratch, void MacroAssembler::CompareRoot(Register with, Register scratch,
...@@ -77,7 +78,8 @@ void MacroAssembler::CompareRoot(Register with, Register scratch, ...@@ -77,7 +78,8 @@ void MacroAssembler::CompareRoot(Register with, Register scratch,
ExternalReference roots_array_start = ExternalReference roots_array_start =
ExternalReference::roots_array_start(isolate()); ExternalReference::roots_array_start(isolate());
mov(scratch, Immediate(static_cast<int>(index))); mov(scratch, Immediate(static_cast<int>(index)));
cmp(with, StaticArray(scratch, times_pointer_size, roots_array_start)); cmp(with, Operand(scratch, times_pointer_size, roots_array_start.address(),
RelocInfo::EXTERNAL_REFERENCE));
} }
void MacroAssembler::CompareRoot(Register with, RootIndex index) { void MacroAssembler::CompareRoot(Register with, RootIndex index) {
...@@ -156,12 +158,6 @@ Operand TurboAssembler::StaticVariable(const ExternalReference& ext) { ...@@ -156,12 +158,6 @@ Operand TurboAssembler::StaticVariable(const ExternalReference& ext) {
return Operand(ext.address(), RelocInfo::EXTERNAL_REFERENCE); return Operand(ext.address(), RelocInfo::EXTERNAL_REFERENCE);
} }
Operand TurboAssembler::StaticArray(Register index, ScaleFactor scale,
const ExternalReference& ext) {
// TODO(jgruber,v8:6666): Root-relative operand once kRootRegister exists.
return Operand(index, scale, ext.address(), RelocInfo::EXTERNAL_REFERENCE);
}
static constexpr Register saved_regs[] = {eax, ecx, edx}; static constexpr Register saved_regs[] = {eax, ecx, edx};
static constexpr int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register); static constexpr int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register);
......
...@@ -274,8 +274,6 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { ...@@ -274,8 +274,6 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
// Wrapper functions to ensure external reference operands produce // Wrapper functions to ensure external reference operands produce
// isolate-independent code if needed. // isolate-independent code if needed.
Operand StaticVariable(const ExternalReference& ext); Operand StaticVariable(const ExternalReference& ext);
Operand StaticArray(Register index, ScaleFactor scale,
const ExternalReference& ext);
// Return and drop arguments from stack, where the number of arguments // Return and drop arguments from stack, where the number of arguments
// may be bigger than 2^16 - 1. Requires a scratch register. // may be bigger than 2^16 - 1. Requires a scratch register.
......
...@@ -585,7 +585,8 @@ bool RegExpMacroAssemblerIA32::CheckSpecialCharacterClass(uc16 type, ...@@ -585,7 +585,8 @@ bool RegExpMacroAssemblerIA32::CheckSpecialCharacterClass(uc16 type,
ExternalReference word_map = ExternalReference word_map =
ExternalReference::re_word_character_map(isolate()); ExternalReference::re_word_character_map(isolate());
__ test_b(current_character(), __ test_b(current_character(),
masm_->StaticArray(current_character(), times_1, word_map)); Operand(current_character(), times_1, word_map.address(),
RelocInfo::EXTERNAL_REFERENCE));
BranchOrBacktrack(zero, on_no_match); BranchOrBacktrack(zero, on_no_match);
return true; return true;
} }
...@@ -600,7 +601,8 @@ bool RegExpMacroAssemblerIA32::CheckSpecialCharacterClass(uc16 type, ...@@ -600,7 +601,8 @@ bool RegExpMacroAssemblerIA32::CheckSpecialCharacterClass(uc16 type,
ExternalReference word_map = ExternalReference word_map =
ExternalReference::re_word_character_map(isolate()); ExternalReference::re_word_character_map(isolate());
__ test_b(current_character(), __ test_b(current_character(),
masm_->StaticArray(current_character(), times_1, word_map)); Operand(current_character(), times_1, word_map.address(),
RelocInfo::EXTERNAL_REFERENCE));
BranchOrBacktrack(not_zero, on_no_match); BranchOrBacktrack(not_zero, on_no_match);
if (mode_ != LATIN1) { if (mode_ != LATIN1) {
__ bind(&done); __ bind(&done);
......
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