Commit ffc48118 authored by Frank Barchard's avatar Frank Barchard

clang-format fixes

Bug: None
Test: lint passes
Change-Id: I1fd40d3506bab1f4f9100902f633a9c9e7b96337
Reviewed-on: https://chromium-review.googlesource.com/745038Reviewed-by: 's avatarFrank Barchard <fbarchard@google.com>
parent 80077a80
...@@ -34,6 +34,7 @@ uint32 HammingDistance_SSE42(const uint8* src_a, ...@@ -34,6 +34,7 @@ uint32 HammingDistance_SSE42(const uint8* src_a,
"xor %%r13,%%r13 \n" "xor %%r13,%%r13 \n"
"xor %%r12,%%r12 \n" "xor %%r12,%%r12 \n"
// Process 32 bytes per loop.
LABELALIGN LABELALIGN
"1: \n" "1: \n"
"mov (%0),%%rax \n" "mov (%0),%%rax \n"
...@@ -56,7 +57,6 @@ uint32 HammingDistance_SSE42(const uint8* src_a, ...@@ -56,7 +57,6 @@ uint32 HammingDistance_SSE42(const uint8* src_a,
"add %%rsi,%%r12 \n" "add %%rsi,%%r12 \n"
"sub $0x20,%2 \n" "sub $0x20,%2 \n"
"jg 1b \n" "jg 1b \n"
"add %%r15, %%r14 \n" "add %%r15, %%r14 \n"
"add %%r13, %%r12 \n" "add %%r13, %%r12 \n"
"add %%r14, %%r12 \n" "add %%r14, %%r12 \n"
...@@ -76,7 +76,9 @@ uint32 HammingDistance_SSE42(const uint8* src_a, ...@@ -76,7 +76,9 @@ uint32 HammingDistance_SSE42(const uint8* src_a,
int count) { int count) {
uint32 diff = 0u; uint32 diff = 0u;
asm volatile(LABELALIGN asm volatile(
// Process 16 bytes per loop.
LABELALIGN
"1: \n" "1: \n"
"mov (%0),%%eax \n" "mov (%0),%%eax \n"
"mov 0x4(%0),%%edx \n" "mov 0x4(%0),%%edx \n"
......
...@@ -256,7 +256,6 @@ TEST_F(LibYUVCompareTest, BenchmarkHammingDistance_Opt) { ...@@ -256,7 +256,6 @@ TEST_F(LibYUVCompareTest, BenchmarkHammingDistance_Opt) {
#else #else
h1 = HammingDistance_C(src_a, src_b, kMaxWidth); h1 = HammingDistance_C(src_a, src_b, kMaxWidth);
#endif #endif
} }
EXPECT_EQ(h0, h1); EXPECT_EQ(h0, h1);
...@@ -339,7 +338,7 @@ static const int kMaxOptCount = (1 << (32 - 3)) - 64; // 536870848 ...@@ -339,7 +338,7 @@ static const int kMaxOptCount = (1 << (32 - 3)) - 64; // 536870848
TEST_F(LibYUVCompareTest, TestHammingDistance_Opt) { TEST_F(LibYUVCompareTest, TestHammingDistance_Opt) {
uint32 h1 = 0; uint32 h1 = 0;
const int kMaxWidth =benchmark_width_ * benchmark_height_; const int kMaxWidth = benchmark_width_ * benchmark_height_;
align_buffer_page_end(src_a, kMaxWidth); align_buffer_page_end(src_a, kMaxWidth);
align_buffer_page_end(src_b, kMaxWidth); align_buffer_page_end(src_b, kMaxWidth);
memset(src_a, 255u, kMaxWidth); memset(src_a, 255u, kMaxWidth);
...@@ -383,7 +382,7 @@ TEST_F(LibYUVCompareTest, TestHammingDistance_Opt) { ...@@ -383,7 +382,7 @@ TEST_F(LibYUVCompareTest, TestHammingDistance_Opt) {
// A large count will cause the low level to potentially overflow so the // A large count will cause the low level to potentially overflow so the
// result can not be expected to be correct. // result can not be expected to be correct.
// TODO(fbarchard): Consider expecting the low 16 bits to match. // TODO(fbarchard): Consider expecting the low 16 bits to match.
if (kMaxWidth<= kMaxOptCount) { if (kMaxWidth <= kMaxOptCount) {
EXPECT_EQ(kMaxWidth * 8U, h1); EXPECT_EQ(kMaxWidth * 8U, h1);
} else { } else {
if (kMaxWidth * 8ULL != static_cast<uint64>(h1)) { if (kMaxWidth * 8ULL != static_cast<uint64>(h1)) {
......
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