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

Unified Diff: runtime/vm/assembler_mips_test.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_mips.cc ('k') | runtime/vm/assembler_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_mips_test.cc
diff --git a/runtime/vm/assembler_mips_test.cc b/runtime/vm/assembler_mips_test.cc
index f34b79cb4406ec62a5d5c16ceb56520075593b5b..1e0340269680f3fff0f1b690ec594e1a04963fda 100644
--- a/runtime/vm/assembler_mips_test.cc
+++ b/runtime/vm/assembler_mips_test.cc
@@ -330,19 +330,17 @@ ASSEMBLER_TEST_RUN(LoadHalfWordUnaligned, test) {
EXPECT(test != NULL);
typedef intptr_t (*LoadHalfWordUnaligned)(intptr_t) DART_UNUSED;
uint8_t buffer[4] = {
- 0x89, 0xAB, 0xCD, 0xEF,
+ 0x89, 0xAB, 0xCD, 0xEF,
};
- EXPECT_EQ(static_cast<int16_t>(static_cast<uint16_t>(0xAB89)),
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- LoadHalfWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[0])));
- EXPECT_EQ(static_cast<int16_t>(static_cast<uint16_t>(0xCDAB)),
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- LoadHalfWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[1])));
+ EXPECT_EQ(
+ static_cast<int16_t>(static_cast<uint16_t>(0xAB89)),
+ EXECUTE_TEST_CODE_INTPTR_INTPTR(LoadHalfWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[0])));
+ EXPECT_EQ(
+ static_cast<int16_t>(static_cast<uint16_t>(0xCDAB)),
+ EXECUTE_TEST_CODE_INTPTR_INTPTR(LoadHalfWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[1])));
}
@@ -356,19 +354,15 @@ ASSEMBLER_TEST_RUN(LoadHalfWordUnsignedUnaligned, test) {
EXPECT(test != NULL);
typedef intptr_t (*LoadHalfWordUnsignedUnaligned)(intptr_t) DART_UNUSED;
uint8_t buffer[4] = {
- 0x89, 0xAB, 0xCD, 0xEF,
+ 0x89, 0xAB, 0xCD, 0xEF,
};
- EXPECT_EQ(0xAB89,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- LoadHalfWordUnsignedUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[0])));
- EXPECT_EQ(0xCDAB,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- LoadHalfWordUnsignedUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[1])));
+ EXPECT_EQ(0xAB89, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ LoadHalfWordUnsignedUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[0])));
+ EXPECT_EQ(0xCDAB, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ LoadHalfWordUnsignedUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[1])));
}
@@ -384,23 +378,19 @@ ASSEMBLER_TEST_RUN(StoreHalfWordUnaligned, test) {
EXPECT(test != NULL);
typedef intptr_t (*StoreHalfWordUnaligned)(intptr_t) DART_UNUSED;
uint8_t buffer[4] = {
- 0, 0, 0, 0,
+ 0, 0, 0, 0,
};
- EXPECT_EQ(0xABCD,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- StoreHalfWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[0])));
+ EXPECT_EQ(0xABCD, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ StoreHalfWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[0])));
EXPECT_EQ(0xCD, buffer[0]);
EXPECT_EQ(0xAB, buffer[1]);
EXPECT_EQ(0, buffer[2]);
- EXPECT_EQ(0xABCD,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- StoreHalfWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[1])));
+ EXPECT_EQ(0xABCD, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ StoreHalfWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[1])));
EXPECT_EQ(0xCD, buffer[1]);
EXPECT_EQ(0xAB, buffer[2]);
EXPECT_EQ(0, buffer[3]);
@@ -416,31 +406,20 @@ ASSEMBLER_TEST_GENERATE(LoadWordUnaligned, assembler) {
ASSEMBLER_TEST_RUN(LoadWordUnaligned, test) {
EXPECT(test != NULL);
typedef intptr_t (*LoadWordUnaligned)(intptr_t) DART_UNUSED;
- uint8_t buffer[8] = {
- 0x12, 0x34, 0x56, 0x78,
- 0x9A, 0xBC, 0xDE, 0xF0
- };
+ uint8_t buffer[8] = {0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0};
- EXPECT_EQ(0x78563412,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- LoadWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[0])));
- EXPECT_EQ(0x9A785634,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- LoadWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[1])));
- EXPECT_EQ(0xBC9A7856,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- LoadWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[2])));
- EXPECT_EQ(0xDEBC9A78,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- LoadWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[3])));
+ EXPECT_EQ(0x78563412, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ LoadWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[0])));
+ EXPECT_EQ(0x9A785634, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ LoadWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[1])));
+ EXPECT_EQ(0xBC9A7856, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ LoadWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[2])));
+ EXPECT_EQ(0xDEBC9A78, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ LoadWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[3])));
}
@@ -455,46 +434,35 @@ ASSEMBLER_TEST_GENERATE(StoreWordUnaligned, assembler) {
ASSEMBLER_TEST_RUN(StoreWordUnaligned, test) {
EXPECT(test != NULL);
typedef intptr_t (*StoreWordUnaligned)(intptr_t) DART_UNUSED;
- uint8_t buffer[8] = {
- 0, 0, 0, 0,
- 0, 0, 0, 0
- };
+ uint8_t buffer[8] = {0, 0, 0, 0, 0, 0, 0, 0};
- EXPECT_EQ(0x12345678,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- StoreWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[0])));
+ EXPECT_EQ(0x12345678, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ StoreWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[0])));
EXPECT_EQ(0x78, buffer[0]);
EXPECT_EQ(0x56, buffer[1]);
EXPECT_EQ(0x34, buffer[2]);
EXPECT_EQ(0x12, buffer[3]);
- EXPECT_EQ(0x12345678,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- StoreWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[1])));
+ EXPECT_EQ(0x12345678, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ StoreWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[1])));
EXPECT_EQ(0x78, buffer[1]);
EXPECT_EQ(0x56, buffer[2]);
EXPECT_EQ(0x34, buffer[3]);
EXPECT_EQ(0x12, buffer[4]);
- EXPECT_EQ(0x12345678,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- StoreWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[2])));
+ EXPECT_EQ(0x12345678, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ StoreWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[2])));
EXPECT_EQ(0x78, buffer[2]);
EXPECT_EQ(0x56, buffer[3]);
EXPECT_EQ(0x34, buffer[4]);
EXPECT_EQ(0x12, buffer[5]);
- EXPECT_EQ(0x12345678,
- EXECUTE_TEST_CODE_INTPTR_INTPTR(
- StoreWordUnaligned,
- test->entry(),
- reinterpret_cast<intptr_t>(&buffer[3])));
+ EXPECT_EQ(0x12345678, EXECUTE_TEST_CODE_INTPTR_INTPTR(
+ StoreWordUnaligned, test->entry(),
+ reinterpret_cast<intptr_t>(&buffer[3])));
EXPECT_EQ(0x78, buffer[3]);
EXPECT_EQ(0x56, buffer[4]);
EXPECT_EQ(0x34, buffer[5]);
@@ -818,7 +786,7 @@ ASSEMBLER_TEST_RUN(Sltu, test) {
ASSEMBLER_TEST_GENERATE(Slti, assembler) {
__ LoadImmediate(T1, -2);
__ slti(A0, T1, Immediate(-1)); // -2 < -1 -> 1.
- __ slti(A1, T1, Immediate(0)); // -2 < 0 -> 1.
+ __ slti(A1, T1, Immediate(0)); // -2 < 0 -> 1.
__ and_(V0, A0, A1);
__ jr(RA);
}
@@ -834,7 +802,7 @@ ASSEMBLER_TEST_GENERATE(Sltiu, assembler) {
__ LoadImmediate(T1, -1);
__ LoadImmediate(T2, 0x10000);
__ sltiu(A0, T1, Immediate(-2)); // 0xffffffffUL < 0xfffffffeUL -> 0.
- __ sltiu(A1, T1, Immediate(0)); // 0xffffffffUL < 0 -> 0.
+ __ sltiu(A1, T1, Immediate(0)); // 0xffffffffUL < 0 -> 0.
__ sltiu(A2, T2, Immediate(-2)); // 0x10000UL < 0xfffffffeUL -> 1.
__ addiu(A2, A2, Immediate(-1));
__ or_(V0, A0, A1);
@@ -2224,7 +2192,7 @@ ASSEMBLER_TEST_RUN(Cop1TruncWD_Inf, test) {
ASSEMBLER_TEST_GENERATE(Cop1TruncWD_Overflow, assembler) {
- __ LoadImmediate(D1, 2.0*kMaxInt32);
+ __ LoadImmediate(D1, 2.0 * kMaxInt32);
__ truncwd(F0, D1);
__ mfc1(V0, F0);
__ Ret();
@@ -2239,7 +2207,7 @@ ASSEMBLER_TEST_RUN(Cop1TruncWD_Overflow, test) {
ASSEMBLER_TEST_GENERATE(Cop1TruncWD_Underflow, assembler) {
- __ LoadImmediate(D1, 2.0*kMinInt32);
+ __ LoadImmediate(D1, 2.0 * kMinInt32);
__ truncwd(F0, D1);
__ mfc1(V0, F0);
__ Ret();
@@ -2312,8 +2280,7 @@ ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
__ sw(THR, Address(SP, 1 * kWordSize));
__ sw(RA, Address(SP, 0 * kWordSize));
__ mov(THR, A2);
- __ StoreIntoObject(A1,
- FieldAddress(A1, GrowableObjectArray::data_offset()),
+ __ StoreIntoObject(A1, FieldAddress(A1, GrowableObjectArray::data_offset()),
A0);
__ lw(RA, Address(SP, 0 * kWordSize));
__ lw(THR, Address(SP, 1 * kWordSize));
@@ -2335,7 +2302,7 @@ ASSEMBLER_TEST_GENERATE(Semaphore, assembler) {
__ sc(T2, Address(SP)); // T1 == 1, success
__ LoadImmediate(T3, 1);
__ bne(T2, T3, &retry); // NE if context switch occurred between ll and sc
- __ Pop(V0); // 42
+ __ Pop(V0); // 42
__ LeaveFrameAndReturn();
}
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | runtime/vm/assembler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698