Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1699)

Unified Diff: runtime/vm/intrinsifier_arm.cc

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_arm.cc
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc
index 3be856404c594e4e6ec4d165d63dc5bb616bb32e..949cc7796af638d6be84dd2f1da2a055e57d17ab 100644
--- a/runtime/vm/intrinsifier_arm.cc
+++ b/runtime/vm/intrinsifier_arm.cc
@@ -30,7 +30,9 @@ namespace dart {
#define __ assembler->
-intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; }
+intptr_t Intrinsifier::ParameterSlotFromSp() {
+ return -1;
+}
static bool IsABIPreservedRegister(Register reg) {
@@ -79,7 +81,7 @@ void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) {
// Note that R1 is Smi, i.e, times 2.
ASSERT(kSmiTagShift == 1);
__ ldr(R2, Address(SP, 0 * kWordSize)); // Value.
- __ add(R1, R0, Operand(R1, LSL, 1)); // R1 is Smi.
+ __ add(R1, R0, Operand(R1, LSL, 1)); // R1 is Smi.
__ StoreIntoObject(R0, FieldAddress(R1, Array::data_offset()), R2);
// Caller is responsible for preserving the value if necessary.
__ Ret();
@@ -104,24 +106,18 @@ void Intrinsifier::GrowableArray_Allocate(Assembler* assembler) {
__ ldr(R1, Address(SP, kArrayOffset)); // Data argument.
// R0 is new, no barrier needed.
__ StoreIntoObjectNoBarrier(
- R0,
- FieldAddress(R0, GrowableObjectArray::data_offset()),
- R1);
+ R0, FieldAddress(R0, GrowableObjectArray::data_offset()), R1);
// R0: new growable array object start as a tagged pointer.
// Store the type argument field in the growable array object.
__ ldr(R1, Address(SP, kTypeArgumentsOffset)); // Type argument.
__ StoreIntoObjectNoBarrier(
- R0,
- FieldAddress(R0, GrowableObjectArray::type_arguments_offset()),
- R1);
+ R0, FieldAddress(R0, GrowableObjectArray::type_arguments_offset()), R1);
// Set the length field in the growable array object to 0.
__ LoadImmediate(R1, 0);
__ StoreIntoObjectNoBarrier(
- R0,
- FieldAddress(R0, GrowableObjectArray::length_offset()),
- R1);
+ R0, FieldAddress(R0, GrowableObjectArray::length_offset()), R1);
__ Ret(); // Returns the newly allocated object in R0.
__ Bind(&fall_through);
@@ -167,7 +163,7 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
Label fall_through; \
const intptr_t kArrayLengthStackOffset = 0 * kWordSize; \
NOT_IN_PRODUCT(__ MaybeTraceAllocation(cid, R2, &fall_through)); \
- __ ldr(R2, Address(SP, kArrayLengthStackOffset)); /* Array length. */ \
+ __ ldr(R2, Address(SP, kArrayLengthStackOffset)); /* Array length. */ \
/* Check that length is a positive Smi. */ \
/* R2: requested array length argument. */ \
__ tst(R2, Operand(kSmiTagMask)); \
@@ -189,7 +185,7 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
\
/* R2: allocation size. */ \
__ adds(R1, R0, Operand(R2)); \
- __ b(&fall_through, CS); /* Fail on unsigned overflow. */ \
+ __ b(&fall_through, CS); /* Fail on unsigned overflow. */ \
\
/* Check if the allocation fits into the remaining space. */ \
/* R0: potential new object start. */ \
@@ -212,24 +208,24 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
/* R4: allocation stats address */ \
{ \
__ CompareImmediate(R2, RawObject::SizeTag::kMaxSizeTag); \
- __ mov(R3, Operand(R2, LSL, \
- RawObject::kSizeTagPos - kObjectAlignmentLog2), LS); \
+ __ mov(R3, \
+ Operand(R2, LSL, RawObject::kSizeTagPos - kObjectAlignmentLog2), \
+ LS); \
__ mov(R3, Operand(0), HI); \
\
/* Get the class index and insert it into the tags. */ \
__ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid)); \
__ orr(R3, R3, Operand(TMP)); \
- __ str(R3, FieldAddress(R0, type_name::tags_offset())); /* Tags. */ \
+ __ str(R3, FieldAddress(R0, type_name::tags_offset())); /* Tags. */ \
} \
/* Set the length field. */ \
/* R0: new object start as a tagged pointer. */ \
/* R1: new object end address. */ \
/* R2: allocation size. */ \
/* R4: allocation stats address. */ \
- __ ldr(R3, Address(SP, kArrayLengthStackOffset)); /* Array length. */ \
- __ StoreIntoObjectNoBarrier(R0, \
- FieldAddress(R0, type_name::length_offset()), \
- R3); \
+ __ ldr(R3, Address(SP, kArrayLengthStackOffset)); /* Array length. */ \
+ __ StoreIntoObjectNoBarrier( \
+ R0, FieldAddress(R0, type_name::length_offset()), R3); \
/* Initialize all array elements to 0. */ \
/* R0: new object start as a tagged pointer. */ \
/* R1: new object end address. */ \
@@ -251,16 +247,21 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
\
NOT_IN_PRODUCT(__ IncrementAllocationStatsWithSize(R4, R2, space)); \
__ Ret(); \
- __ Bind(&fall_through); \
+ __ Bind(&fall_through);
static int GetScaleFactor(intptr_t size) {
switch (size) {
- case 1: return 0;
- case 2: return 1;
- case 4: return 2;
- case 8: return 3;
- case 16: return 4;
+ case 1:
+ return 0;
+ case 2:
+ return 1;
+ case 4:
+ return 2;
+ case 8:
+ return 3;
+ case 16:
+ return 4;
}
UNREACHABLE();
return -1;
@@ -268,12 +269,12 @@ static int GetScaleFactor(intptr_t size) {
#define TYPED_DATA_ALLOCATOR(clazz) \
-void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) { \
- intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid); \
- intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid); \
- int shift = GetScaleFactor(size); \
- TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, shift); \
-}
+ void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) { \
+ intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid); \
+ intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid); \
+ int shift = GetScaleFactor(size); \
+ TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, shift); \
+ }
CLASS_LIST_TYPED_DATA(TYPED_DATA_ALLOCATOR)
#undef TYPED_DATA_ALLOCATOR
@@ -281,8 +282,8 @@ CLASS_LIST_TYPED_DATA(TYPED_DATA_ALLOCATOR)
// Loads args from stack into R0 and R1
// Tests if they are smis, jumps to label not_smi if not.
static void TestBothArgumentsSmis(Assembler* assembler, Label* not_smi) {
- __ ldr(R0, Address(SP, + 0 * kWordSize));
- __ ldr(R1, Address(SP, + 1 * kWordSize));
+ __ ldr(R0, Address(SP, +0 * kWordSize));
+ __ ldr(R1, Address(SP, +1 * kWordSize));
__ orr(TMP, R0, Operand(R1));
__ tst(TMP, Operand(kSmiTagMask));
__ b(not_smi, NE);
@@ -293,8 +294,8 @@ static void TestBothArgumentsSmis(Assembler* assembler, Label* not_smi) {
void Intrinsifier::Integer_addFromInteger(Assembler* assembler) {
Label fall_through;
TestBothArgumentsSmis(assembler, &fall_through); // Checks two smis.
- __ adds(R0, R0, Operand(R1)); // Adds.
- __ bx(LR, VC); // Return if no overflow.
+ __ adds(R0, R0, Operand(R1)); // Adds.
+ __ bx(LR, VC); // Return if no overflow.
// Otherwise fall through.
__ Bind(&fall_through);
}
@@ -309,7 +310,7 @@ void Intrinsifier::Integer_subFromInteger(Assembler* assembler) {
Label fall_through;
TestBothArgumentsSmis(assembler, &fall_through);
__ subs(R0, R0, Operand(R1)); // Subtract.
- __ bx(LR, VC); // Return if no overflow.
+ __ bx(LR, VC); // Return if no overflow.
// Otherwise fall through.
__ Bind(&fall_through);
}
@@ -319,7 +320,7 @@ void Intrinsifier::Integer_sub(Assembler* assembler) {
Label fall_through;
TestBothArgumentsSmis(assembler, &fall_through);
__ subs(R0, R1, Operand(R0)); // Subtract.
- __ bx(LR, VC); // Return if no overflow.
+ __ bx(LR, VC); // Return if no overflow.
// Otherwise fall through.
__ Bind(&fall_through);
}
@@ -328,7 +329,7 @@ void Intrinsifier::Integer_sub(Assembler* assembler) {
void Intrinsifier::Integer_mulFromInteger(Assembler* assembler) {
Label fall_through;
TestBothArgumentsSmis(assembler, &fall_through); // checks two smis
- __ SmiUntag(R0); // Untags R0. We only want result shifted by one.
+ __ SmiUntag(R0); // Untags R0. We only want result shifted by one.
__ smull(R0, IP, R0, R1); // IP:R0 <- R0 * R1.
__ cmp(IP, Operand(R0, ASR, 31));
__ bx(LR, EQ);
@@ -404,8 +405,8 @@ void Intrinsifier::Integer_moduloFromInteger(Assembler* assembler) {
}
// Check to see if we have integer division
Label fall_through;
- __ ldr(R1, Address(SP, + 0 * kWordSize));
- __ ldr(R0, Address(SP, + 1 * kWordSize));
+ __ ldr(R1, Address(SP, +0 * kWordSize));
+ __ ldr(R0, Address(SP, +1 * kWordSize));
__ orr(TMP, R0, Operand(R1));
__ tst(TMP, Operand(kSmiTagMask));
__ b(&fall_through, NE);
@@ -452,15 +453,15 @@ void Intrinsifier::Integer_truncDivide(Assembler* assembler) {
// cannot tag the result.
__ CompareImmediate(R0, 0x40000000);
__ SmiTag(R0, NE); // Not equal. Okay to tag and return.
- __ bx(LR, NE); // Return.
+ __ bx(LR, NE); // Return.
__ Bind(&fall_through);
}
void Intrinsifier::Integer_negate(Assembler* assembler) {
Label fall_through;
- __ ldr(R0, Address(SP, + 0 * kWordSize)); // Grab first argument.
- __ tst(R0, Operand(kSmiTagMask)); // Test for Smi.
+ __ ldr(R0, Address(SP, +0 * kWordSize)); // Grab first argument.
+ __ tst(R0, Operand(kSmiTagMask)); // Test for Smi.
__ b(&fall_through, NE);
__ rsbs(R0, R0, Operand(0)); // R0 is a Smi. R0 <- 0 - R0.
__ bx(LR, VC); // Return if there wasn't overflow, fall through otherwise.
@@ -547,16 +548,16 @@ void Intrinsifier::Integer_shl(Assembler* assembler) {
// lo bits = R1 << R0
__ LoadImmediate(NOTFP, 1);
__ mov(NOTFP, Operand(NOTFP, LSL, R0)); // NOTFP <- 1 << R0
- __ sub(NOTFP, NOTFP, Operand(1)); // NOTFP <- NOTFP - 1
- __ rsb(R3, R0, Operand(32)); // R3 <- 32 - R0
+ __ sub(NOTFP, NOTFP, Operand(1)); // NOTFP <- NOTFP - 1
+ __ rsb(R3, R0, Operand(32)); // R3 <- 32 - R0
__ mov(NOTFP, Operand(NOTFP, LSL, R3)); // NOTFP <- NOTFP << R3
- __ and_(NOTFP, R1, Operand(NOTFP)); // NOTFP <- NOTFP & R1
+ __ and_(NOTFP, R1, Operand(NOTFP)); // NOTFP <- NOTFP & R1
__ mov(NOTFP, Operand(NOTFP, LSR, R3)); // NOTFP <- NOTFP >> R3
// Now NOTFP has the bits that fall off of R1 on a left shift.
__ mov(R1, Operand(R1, LSL, R0)); // R1 gets the low bits.
- const Class& mint_class = Class::Handle(
- Isolate::Current()->object_store()->mint_class());
+ const Class& mint_class =
+ Class::Handle(Isolate::Current()->object_store()->mint_class());
__ TryAllocate(mint_class, &fall_through, R0, R2);
@@ -902,7 +903,7 @@ void Intrinsifier::Bigint_absAdd(Assembler* assembler) {
Label last_carry;
__ teq(R1, Operand(R6)); // Does not affect carry flag.
- __ b(&last_carry, EQ); // If used - a_used == 0.
+ __ b(&last_carry, EQ); // If used - a_used == 0.
Label carry_loop;
__ Bind(&carry_loop);
@@ -962,7 +963,7 @@ void Intrinsifier::Bigint_absSub(Assembler* assembler) {
Label done;
__ teq(R1, Operand(R6)); // Does not affect carry flag.
- __ b(&done, EQ); // If used - a_used == 0.
+ __ b(&done, EQ); // If used - a_used == 0.
Label carry_loop;
__ Bind(&carry_loop);
@@ -1121,7 +1122,7 @@ void Intrinsifier::Bigint_sqrAdd(Assembler* assembler) {
// NOTFP = ajp = &a_digits[i]
__ ldr(R1, Address(SP, 1 * kWordSize)); // a_digits
- __ add(R1, R1, Operand(R2, LSL, 2)); // j == 2*i, i is Smi.
+ __ add(R1, R1, Operand(R2, LSL, 2)); // j == 2*i, i is Smi.
__ add(NOTFP, R1, Operand(TypedData::data_offset() - kHeapObjectTag));
// R8:R0 = t = x*x + *ajp
@@ -1164,7 +1165,7 @@ void Intrinsifier::Bigint_sqrAdd(Assembler* assembler) {
__ adc(R2, R2, Operand(0)); // R2:R1:R0 = 2*x*xi.
__ adds(R0, R0, Operand(R8));
__ adcs(R1, R1, Operand(R9));
- __ adc(R2, R2, Operand(0)); // R2:R1:R0 = 2*x*xi + c.
+ __ adc(R2, R2, Operand(0)); // R2:R1:R0 = 2*x*xi + c.
__ ldr(R8, Address(NOTFP, 0)); // R8 = aj = *ajp.
__ adds(R0, R0, Operand(R8));
__ adcs(R8, R1, Operand(0));
@@ -1214,8 +1215,8 @@ void Intrinsifier::Montgomery_mulMod(Assembler* assembler) {
__ ldr(R4, Address(SP, 2 * kWordSize)); // args
// R3 = rho = args[2]
- __ ldr(R3, FieldAddress(R4,
- TypedData::data_offset() + 2*Bigint::kBytesPerDigit));
+ __ ldr(R3, FieldAddress(
+ R4, TypedData::data_offset() + 2 * Bigint::kBytesPerDigit));
// R2 = digits[i >> 1]
__ ldrd(R0, R1, SP, 0 * kWordSize); // R0 = i as Smi, R1 = digits
@@ -1226,8 +1227,8 @@ void Intrinsifier::Montgomery_mulMod(Assembler* assembler) {
__ umull(R0, R1, R2, R3);
// args[4] = t mod DIGIT_BASE = low32(t)
- __ str(R0,
- FieldAddress(R4, TypedData::data_offset() + 4*Bigint::kBytesPerDigit));
+ __ str(R0, FieldAddress(
+ R4, TypedData::data_offset() + 4 * Bigint::kBytesPerDigit));
__ mov(R0, Operand(Smi::RawValue(1))); // One digit processed.
__ Ret();
@@ -1321,14 +1322,23 @@ static void DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) {
__ ldr(R0, Address(SP, 1 * kWordSize)); // Left argument.
__ LoadDFromOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
switch (kind) {
- case Token::kADD: __ vaddd(D0, D0, D1); break;
- case Token::kSUB: __ vsubd(D0, D0, D1); break;
- case Token::kMUL: __ vmuld(D0, D0, D1); break;
- case Token::kDIV: __ vdivd(D0, D0, D1); break;
- default: UNREACHABLE();
+ case Token::kADD:
+ __ vaddd(D0, D0, D1);
+ break;
+ case Token::kSUB:
+ __ vsubd(D0, D0, D1);
+ break;
+ case Token::kMUL:
+ __ vmuld(D0, D0, D1);
+ break;
+ case Token::kDIV:
+ __ vdivd(D0, D0, D1);
+ break;
+ default:
+ UNREACHABLE();
}
- const Class& double_class = Class::Handle(
- Isolate::Current()->object_store()->double_class());
+ const Class& double_class =
+ Class::Handle(Isolate::Current()->object_store()->double_class());
__ TryAllocate(double_class, &fall_through, R0, R1); // Result register.
__ StoreDToOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
__ Ret();
@@ -1377,8 +1387,8 @@ void Intrinsifier::Double_mulFromInteger(Assembler* assembler) {
__ ldr(R0, Address(SP, 1 * kWordSize));
__ LoadDFromOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
__ vmuld(D0, D0, D1);
- const Class& double_class = Class::Handle(
- Isolate::Current()->object_store()->double_class());
+ const Class& double_class =
+ Class::Handle(Isolate::Current()->object_store()->double_class());
__ TryAllocate(double_class, &fall_through, R0, R1); // Result register.
__ StoreDToOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
__ Ret();
@@ -1398,8 +1408,8 @@ void Intrinsifier::DoubleFromInteger(Assembler* assembler) {
__ SmiUntag(R0);
__ vmovsr(S0, R0);
__ vcvtdi(D0, S0);
- const Class& double_class = Class::Handle(
- Isolate::Current()->object_store()->double_class());
+ const Class& double_class =
+ Class::Handle(Isolate::Current()->object_store()->double_class());
__ TryAllocate(double_class, &fall_through, R0, R1); // Result register.
__ StoreDToOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
__ Ret();
@@ -1455,7 +1465,7 @@ void Intrinsifier::Double_getIsNegative(Assembler* assembler) {
__ vcmpdz(D0);
__ vmstat();
__ b(&is_false, VS); // NaN -> false.
- __ b(&is_zero, EQ); // Check for negative zero.
+ __ b(&is_zero, EQ); // Check for negative zero.
__ b(&is_false, CS); // >= 0 -> false.
__ Bind(&is_true);
@@ -1510,8 +1520,8 @@ void Intrinsifier::MathSqrt(Assembler* assembler) {
__ LoadDFromOffset(D1, R0, Double::value_offset() - kHeapObjectTag);
__ Bind(&double_op);
__ vsqrtd(D0, D1);
- const Class& double_class = Class::Handle(
- Isolate::Current()->object_store()->double_class());
+ const Class& double_class =
+ Class::Handle(Isolate::Current()->object_store()->double_class());
__ TryAllocate(double_class, &fall_through, R0, R1); // Result register.
__ StoreDToOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
__ Ret();
@@ -1531,8 +1541,8 @@ void Intrinsifier::MathSqrt(Assembler* assembler) {
void Intrinsifier::Random_nextState(Assembler* assembler) {
const Library& math_lib = Library::Handle(Library::MathLibrary());
ASSERT(!math_lib.IsNull());
- const Class& random_class = Class::Handle(
- math_lib.LookupClassAllowPrivate(Symbols::_Random()));
+ const Class& random_class =
+ Class::Handle(math_lib.LookupClassAllowPrivate(Symbols::_Random()));
ASSERT(!random_class.IsNull());
const Field& state_field = Field::ZoneHandle(
random_class.LookupInstanceFieldAllowPrivate(Symbols::_state()));
@@ -1554,8 +1564,8 @@ void Intrinsifier::Random_nextState(Assembler* assembler) {
// Addresses of _state[0] and _state[1].
const int64_t disp_0 = Instance::DataOffsetFor(kTypedDataUint32ArrayCid);
- const int64_t disp_1 = disp_0 +
- Instance::ElementSizeFor(kTypedDataUint32ArrayCid);
+ const int64_t disp_1 =
+ disp_0 + Instance::ElementSizeFor(kTypedDataUint32ArrayCid);
__ LoadImmediate(R0, a_int32_value);
__ LoadFromOffset(kWord, R2, R1, disp_0 - kHeapObjectTag);
@@ -1613,16 +1623,11 @@ static void JumpIfNotInteger(Assembler* assembler,
static void JumpIfString(Assembler* assembler,
- Register cid,
- Register tmp,
- Label* target) {
- RangeCheck(assembler,
- cid,
- tmp,
- kOneByteStringCid,
- kExternalTwoByteStringCid,
- kIfInRange,
- target);
+ Register cid,
+ Register tmp,
+ Label* target) {
+ RangeCheck(assembler, cid, tmp, kOneByteStringCid, kExternalTwoByteStringCid,
+ kIfInRange, target);
}
@@ -1630,13 +1635,8 @@ static void JumpIfNotString(Assembler* assembler,
Register cid,
Register tmp,
Label* target) {
- RangeCheck(assembler,
- cid,
- tmp,
- kOneByteStringCid,
- kExternalTwoByteStringCid,
- kIfNotInRange,
- target);
+ RangeCheck(assembler, cid, tmp, kOneByteStringCid, kExternalTwoByteStringCid,
+ kIfNotInRange, target);
}
@@ -1800,9 +1800,9 @@ void GenerateSubstringMatchesSpecialization(Assembler* assembler,
__ Bind(&loop);
if (receiver_cid == kOneByteStringCid) {
- __ ldrb(R4, Address(R0, 0)); // this.codeUnitAt(i + start)
+ __ ldrb(R4, Address(R0, 0)); // this.codeUnitAt(i + start)
} else {
- __ ldrh(R4, Address(R0, 0)); // this.codeUnitAt(i + start)
+ __ ldrh(R4, Address(R0, 0)); // this.codeUnitAt(i + start)
}
if (other_cid == kOneByteStringCid) {
__ ldrb(NOTFP, Address(R2, 0)); // other.codeUnitAt(i)
@@ -1831,7 +1831,7 @@ void Intrinsifier::StringBaseSubstringMatches(Assembler* assembler) {
__ ldr(R0, Address(SP, 2 * kWordSize)); // this
__ ldr(R1, Address(SP, 1 * kWordSize)); // start
__ ldr(R2, Address(SP, 0 * kWordSize)); // other
- __ Push(R4); // Make ARGS_DESC_REG available.
+ __ Push(R4); // Make ARGS_DESC_REG available.
__ tst(R1, Operand(kSmiTagMask));
__ b(&fall_through, NE); // 'start' is not a Smi.
@@ -1842,20 +1842,16 @@ void Intrinsifier::StringBaseSubstringMatches(Assembler* assembler) {
__ CompareClassId(R0, kOneByteStringCid, R3);
__ b(&try_two_byte, NE);
- GenerateSubstringMatchesSpecialization(assembler,
- kOneByteStringCid,
- kOneByteStringCid,
- &return_true,
+ GenerateSubstringMatchesSpecialization(assembler, kOneByteStringCid,
+ kOneByteStringCid, &return_true,
&return_false);
__ Bind(&try_two_byte);
__ CompareClassId(R0, kTwoByteStringCid, R3);
__ b(&fall_through, NE);
- GenerateSubstringMatchesSpecialization(assembler,
- kTwoByteStringCid,
- kOneByteStringCid,
- &return_true,
+ GenerateSubstringMatchesSpecialization(assembler, kTwoByteStringCid,
+ kOneByteStringCid, &return_true,
&return_false);
__ Bind(&return_true);
@@ -2044,14 +2040,11 @@ static void TryAllocateOnebyteString(Assembler* assembler,
}
// Set the length field using the saved length (R8).
- __ StoreIntoObjectNoBarrier(R0,
- FieldAddress(R0, String::length_offset()),
+ __ StoreIntoObjectNoBarrier(R0, FieldAddress(R0, String::length_offset()),
R8);
// Clear hash.
__ LoadImmediate(TMP, 0);
- __ StoreIntoObjectNoBarrier(R0,
- FieldAddress(R0, String::hash_offset()),
- TMP);
+ __ StoreIntoObjectNoBarrier(R0, FieldAddress(R0, String::hash_offset()), TMP);
NOT_IN_PRODUCT(__ IncrementAllocationStatsWithSize(R4, R2, space));
__ b(ok);
@@ -2073,7 +2066,7 @@ void Intrinsifier::OneByteString_substringUnchecked(Assembler* assembler) {
__ ldr(R2, Address(SP, kEndIndexOffset));
__ ldr(TMP, Address(SP, kStartIndexOffset));
- __ orr(R3, R2, Operand(TMP));
+ __ orr(R3, R2, Operand(TMP));
__ tst(R3, Operand(kSmiTagMask));
__ b(&fall_through, NE); // 'start', 'end' not Smi.
@@ -2171,8 +2164,9 @@ static void StringEquality(Assembler* assembler, intptr_t string_cid) {
// TODO(zra): try out other sequences.
ASSERT((string_cid == kOneByteStringCid) ||
(string_cid == kTwoByteStringCid));
- const intptr_t offset = (string_cid == kOneByteStringCid) ?
- OneByteString::data_offset() : TwoByteString::data_offset();
+ const intptr_t offset = (string_cid == kOneByteStringCid)
+ ? OneByteString::data_offset()
+ : TwoByteString::data_offset();
__ AddImmediate(R0, offset - kHeapObjectTag);
__ AddImmediate(R1, offset - kHeapObjectTag);
__ SmiUntag(R2);
@@ -2258,7 +2252,7 @@ void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) {
// R0: Current user tag.
__ ldr(R0, Address(R1, Isolate::current_tag_offset()));
// R2: UserTag.
- __ ldr(R2, Address(SP, + 0 * kWordSize));
+ __ ldr(R2, Address(SP, +0 * kWordSize));
// Set Isolate::current_tag_.
__ str(R2, Address(R1, Isolate::current_tag_offset()));
// R2: UserTag's tag.
« no previous file with comments | « runtime/vm/intrinsifier.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698