Unverified Commit ecc16853 by Luís Marques Committed by GitHub

Fix formatting issues introduced by a77d5f70 (#959)

parent 8cead007
...@@ -86,15 +86,15 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() { ...@@ -86,15 +86,15 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
// This returns a time-base, which is not always precisely a cycle-count. // This returns a time-base, which is not always precisely a cycle-count.
#if defined(__powerpc64__) || defined(__ppc64__) #if defined(__powerpc64__) || defined(__ppc64__)
int64_t tb; int64_t tb;
asm volatile("mfspr %0, 268" : "=r" (tb)); asm volatile("mfspr %0, 268" : "=r"(tb));
return tb; return tb;
#else #else
uint32_t tbl, tbu0, tbu1; uint32_t tbl, tbu0, tbu1;
asm volatile( asm volatile(
"mftbu %0\n" "mftbu %0\n"
"mftbl %1\n" "mftbl %1\n"
"mftbu %2" "mftbu %2"
: "=r"(tbu0), "=r"(tbl), "=r"(tbu1)); : "=r"(tbu0), "=r"(tbl), "=r"(tbu1));
tbl &= -static_cast<int32_t>(tbu0 == tbu1); tbl &= -static_cast<int32_t>(tbu0 == tbu1);
// high 32 bits in tbu1; low 32 bits in tbl (tbu0 is no longer needed) // high 32 bits in tbu1; low 32 bits in tbl (tbu0 is no longer needed)
return (static_cast<uint64_t>(tbu1) << 32) | tbl; return (static_cast<uint64_t>(tbu1) << 32) | tbl;
...@@ -179,14 +179,14 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() { ...@@ -179,14 +179,14 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
// This asm also includes the PowerPC overflow handling strategy, as above. // This asm also includes the PowerPC overflow handling strategy, as above.
// Implemented in assembly because Clang insisted on branching. // Implemented in assembly because Clang insisted on branching.
asm volatile( asm volatile(
"rdcycleh %0\n" "rdcycleh %0\n"
"rdcycle %1\n" "rdcycle %1\n"
"rdcycleh %2\n" "rdcycleh %2\n"
"sub %0, %0, %2\n" "sub %0, %0, %2\n"
"seqz %0, %0\n" "seqz %0, %0\n"
"sub %0, zero, %0\n" "sub %0, zero, %0\n"
"and %1, %1, %0\n" "and %1, %1, %0\n"
: "=r"(cycles_hi0), "=r"(cycles_lo), "=r"(cycles_hi1)); : "=r"(cycles_hi0), "=r"(cycles_lo), "=r"(cycles_hi1));
return (static_cast<uint64_t>(cycles_hi1) << 32) | cycles_lo; return (static_cast<uint64_t>(cycles_hi1) << 32) | cycles_lo;
#else #else
uint64_t cycles; uint64_t cycles;
......
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