From 6c8a6c2640ce93021a9775f1b6fdea319dd79185 Mon Sep 17 00:00:00 2001 From: "erik.corry@gmail.com" Date: Mon, 2 Apr 2012 13:26:05 +0000 Subject: [PATCH] Cosmetic (ARM/MIPS): Use FieldMemOperand where appropriate. Review URL: https://chromiumcodereview.appspot.com/9963051 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/stub-cache-arm.cc | 4 ++-- src/mips/full-codegen-mips.cc | 2 +- src/mips/regexp-macro-assembler-mips.cc | 2 +- src/mips/stub-cache-mips.cc | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc index 06f8385af9..cfd93bc9a6 100644 --- a/src/arm/stub-cache-arm.cc +++ b/src/arm/stub-cache-arm.cc @@ -1730,7 +1730,7 @@ Handle CallStubCompiler::CompileArrayPopCall( // We can't address the last element in one operation. Compute the more // expensive shift first, and use an offset later on. __ add(elements, elements, Operand(r4, LSL, kPointerSizeLog2 - kSmiTagSize)); - __ ldr(r0, MemOperand(elements, FixedArray::kHeaderSize - kHeapObjectTag)); + __ ldr(r0, FieldMemOperand(elements, FixedArray::kHeaderSize)); __ cmp(r0, r6); __ b(eq, &call_builtin); @@ -1738,7 +1738,7 @@ Handle CallStubCompiler::CompileArrayPopCall( __ str(r4, FieldMemOperand(receiver, JSArray::kLengthOffset)); // Fill with the hole. - __ str(r6, MemOperand(elements, FixedArray::kHeaderSize - kHeapObjectTag)); + __ str(r6, FieldMemOperand(elements, FixedArray::kHeaderSize)); __ Drop(argc + 1); __ Ret(); diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index 64cdc8e9d5..2afad13ecd 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -2977,7 +2977,7 @@ void FullCodeGenerator::EmitRandomHeapNumber(CallRuntime* expr) { __ Move(f14, zero_reg, a1); // Subtract and store the result in the heap number. __ sub_d(f0, f12, f14); - __ sdc1(f0, MemOperand(s0, HeapNumber::kValueOffset - kHeapObjectTag)); + __ sdc1(f0, FieldMemOperand(s0, HeapNumber::kValueOffset)); __ mov(v0, s0); } else { __ PrepareCallCFunction(2, a0); diff --git a/src/mips/regexp-macro-assembler-mips.cc b/src/mips/regexp-macro-assembler-mips.cc index 00461a7aeb..dde4a65a9e 100644 --- a/src/mips/regexp-macro-assembler-mips.cc +++ b/src/mips/regexp-macro-assembler-mips.cc @@ -513,7 +513,7 @@ void RegExpMacroAssemblerMIPS::CheckBitInTable( __ Addu(a0, a0, current_character()); } - __ lbu(a0, MemOperand(a0, ByteArray::kHeaderSize - kHeapObjectTag)); + __ lbu(a0, FieldMemOperand(a0, ByteArray::kHeaderSize)); BranchOrBacktrack(on_bit_set, ne, a0, Operand(zero_reg)); } diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc index 294bc0a074..4d18c942db 100644 --- a/src/mips/stub-cache-mips.cc +++ b/src/mips/stub-cache-mips.cc @@ -1737,14 +1737,14 @@ Handle CallStubCompiler::CompileArrayPopCall( // expensive shift first, and use an offset later on. __ sll(t1, t0, kPointerSizeLog2 - kSmiTagSize); __ Addu(elements, elements, t1); - __ lw(v0, MemOperand(elements, FixedArray::kHeaderSize - kHeapObjectTag)); + __ lw(v0, FieldMemOperand(elements, FixedArray::kHeaderSize)); __ Branch(&call_builtin, eq, v0, Operand(t2)); // Set the array's length. __ sw(t0, FieldMemOperand(receiver, JSArray::kLengthOffset)); // Fill with the hole. - __ sw(t2, MemOperand(elements, FixedArray::kHeaderSize - kHeapObjectTag)); + __ sw(t2, FieldMemOperand(elements, FixedArray::kHeaderSize)); __ Drop(argc + 1); __ Ret(); @@ -3496,7 +3496,7 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray( CpuFeatures::Scope scope(FPU); __ mtc1(value, f0); __ cvt_d_w(f0, f0); - __ sdc1(f0, MemOperand(v0, HeapNumber::kValueOffset - kHeapObjectTag)); + __ sdc1(f0, FieldMemOperand(v0, HeapNumber::kValueOffset)); __ Ret(); } else { Register dst1 = t2; @@ -3544,7 +3544,7 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray( __ Cvt_d_uw(f0, value, f22); - __ sdc1(f0, MemOperand(v0, HeapNumber::kValueOffset - kHeapObjectTag)); + __ sdc1(f0, FieldMemOperand(v0, HeapNumber::kValueOffset)); __ Ret(); } else { @@ -3598,7 +3598,7 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray( __ AllocateHeapNumber(v0, t3, t5, t6, &slow); // The float (single) value is already in fpu reg f0 (if we use float). __ cvt_d_s(f0, f0); - __ sdc1(f0, MemOperand(v0, HeapNumber::kValueOffset - kHeapObjectTag)); + __ sdc1(f0, FieldMemOperand(v0, HeapNumber::kValueOffset)); __ Ret(); } else { // Allocate a HeapNumber for the result. Don't use a0 and a1 as