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

Unified Diff: runtime/vm/assembler_x64.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/assembler_x64.h ('k') | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64.cc
diff --git a/runtime/vm/assembler_x64.cc b/runtime/vm/assembler_x64.cc
index a1b66950c9ea3742aa2fdbf8d22024bf0ffe487e..20541ef5e69d2c9eb0194b38fce817784577eb87 100644
--- a/runtime/vm/assembler_x64.cc
+++ b/runtime/vm/assembler_x64.cc
@@ -487,7 +487,6 @@ void Assembler::cmovlessq(Register dst, Register src) {
}
-
void Assembler::movss(XmmRegister dst, const Address& src) {
ASSERT(dst <= XMM15);
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
@@ -2792,9 +2791,8 @@ void Assembler::LoadObjectHelper(Register dst,
if (Thread::CanLoadFromThread(object)) {
movq(dst, Address(THR, Thread::OffsetFromThread(object)));
} else if (CanLoadFromObjectPool(object)) {
- const intptr_t idx =
- is_unique ? object_pool_wrapper_.AddObject(object)
- : object_pool_wrapper_.FindObject(object);
+ const intptr_t idx = is_unique ? object_pool_wrapper_.AddObject(object)
+ : object_pool_wrapper_.FindObject(object);
const int32_t offset = ObjectPool::element_offset(idx);
LoadWordFromPoolOffset(dst, offset - kHeapObjectTag);
} else {
@@ -2863,12 +2861,11 @@ void Assembler::CompareObject(Register reg, const Object& object) {
cmpq(reg, Address(THR, Thread::OffsetFromThread(object)));
} else if (CanLoadFromObjectPool(object)) {
const intptr_t idx = object_pool_wrapper_.FindObject(object, kNotPatchable);
- const int32_t offset = ObjectPool::element_offset(idx);
- cmpq(reg, Address(PP, offset-kHeapObjectTag));
+ const int32_t offset = ObjectPool::element_offset(idx);
+ cmpq(reg, Address(PP, offset - kHeapObjectTag));
} else {
ASSERT(object.IsSmi());
- CompareImmediate(
- reg, Immediate(reinterpret_cast<int64_t>(object.raw())));
+ CompareImmediate(reg, Immediate(reinterpret_cast<int64_t>(object.raw())));
}
}
@@ -2932,9 +2929,8 @@ void Assembler::StoreIntoObjectFilter(Register object,
// Mask out higher, uninteresting bits which were polluted by dest.
andl(value, Immediate(kObjectAlignment - 1));
// Compare with the expected bit pattern.
- cmpl(value, Immediate(
- (kNewObjectAlignmentOffset >> 1) + kHeapObjectTag +
- kOldObjectAlignmentOffset + kHeapObjectTag));
+ cmpl(value, Immediate((kNewObjectAlignmentOffset >> 1) + kHeapObjectTag +
+ kOldObjectAlignmentOffset + kHeapObjectTag));
j(NOT_ZERO, no_update, Assembler::kNearJump);
}
@@ -3372,8 +3368,7 @@ void Assembler::MaybeTraceAllocation(intptr_t cid,
}
-void Assembler::UpdateAllocationStats(intptr_t cid,
- Heap::Space space) {
+void Assembler::UpdateAllocationStats(intptr_t cid, Heap::Space space) {
ASSERT(cid > 0);
intptr_t counter_offset =
ClassTable::CounterOffsetFor(cid, space == Heap::kNew);
@@ -3507,7 +3502,7 @@ void Assembler::Align(int alignment, intptr_t offset) {
if (bytes_needed) {
nop(bytes_needed);
}
- ASSERT(((offset + buffer_.GetPosition()) & (alignment-1)) == 0);
+ ASSERT(((offset + buffer_.GetPosition()) & (alignment - 1)) == 0);
}
@@ -3632,8 +3627,8 @@ void Assembler::LoadClassId(Register result, Register object) {
ASSERT(RawObject::kClassIdTagPos == kBitsPerInt32);
ASSERT(RawObject::kClassIdTagSize == kBitsPerInt32);
ASSERT(sizeof(classid_t) == sizeof(uint32_t));
- const intptr_t class_id_offset = Object::tags_offset() +
- RawObject::kClassIdTagPos / kBitsPerByte;
+ const intptr_t class_id_offset =
+ Object::tags_offset() + RawObject::kClassIdTagPos / kBitsPerByte;
movl(result, FieldAddress(object, class_id_offset));
}
@@ -3667,8 +3662,8 @@ void Assembler::SmiUntagOrCheckClass(Register object,
ASSERT(RawObject::kClassIdTagPos == kBitsPerInt32);
ASSERT(RawObject::kClassIdTagSize == kBitsPerInt32);
ASSERT(sizeof(classid_t) == sizeof(uint32_t));
- const intptr_t class_id_offset = Object::tags_offset() +
- RawObject::kClassIdTagPos / kBitsPerByte;
+ const intptr_t class_id_offset =
+ Object::tags_offset() + RawObject::kClassIdTagPos / kBitsPerByte;
// Untag optimistically. Tag bit is shifted into the CARRY.
SmiUntag(object);
@@ -3716,7 +3711,7 @@ Address Assembler::ElementAddressForIntIndex(bool is_external,
return Address(array, index * index_scale);
} else {
const int64_t disp = static_cast<int64_t>(index) * index_scale +
- Instance::DataOffsetFor(cid);
+ Instance::DataOffsetFor(cid);
ASSERT(Utils::IsInt(32, disp));
return FieldAddress(array, static_cast<int32_t>(disp));
}
@@ -3729,11 +3724,16 @@ static ScaleFactor ToScaleFactor(intptr_t index_scale) {
// expected to be untagged before accessing.
ASSERT(kSmiTagShift == 1);
switch (index_scale) {
- case 1: return TIMES_1;
- case 2: return TIMES_1;
- case 4: return TIMES_2;
- case 8: return TIMES_4;
- case 16: return TIMES_8;
+ case 1:
+ return TIMES_1;
+ case 2:
+ return TIMES_1;
+ case 4:
+ return TIMES_2;
+ case 8:
+ return TIMES_4;
+ case 16:
+ return TIMES_8;
default:
UNREACHABLE();
return TIMES_1;
@@ -3749,18 +3749,15 @@ Address Assembler::ElementAddressForRegIndex(bool is_external,
if (is_external) {
return Address(array, index, ToScaleFactor(index_scale), 0);
} else {
- return FieldAddress(array,
- index,
- ToScaleFactor(index_scale),
+ return FieldAddress(array, index, ToScaleFactor(index_scale),
Instance::DataOffsetFor(cid));
}
}
static const char* cpu_reg_names[kNumberOfCpuRegisters] = {
- "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
- "r8", "r9", "r10", "r11", "r12", "r13", "thr", "pp"
-};
+ "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
+ "r8", "r9", "r10", "r11", "r12", "r13", "thr", "pp"};
const char* Assembler::RegisterName(Register reg) {
@@ -3770,9 +3767,8 @@ const char* Assembler::RegisterName(Register reg) {
static const char* xmm_reg_names[kNumberOfXmmRegisters] = {
- "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7",
- "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"
-};
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7",
+ "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"};
const char* Assembler::FpuRegisterName(FpuRegister reg) {
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698