format: edit risc-v asm code for linter

This commit is contained in:
XieJiSS 2022-02-16 14:37:44 +08:00 committed by GitHub
parent 55b049fc34
commit 1e730ed46f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,14 +141,14 @@ static inline tokutime_t toku_time_now(void) {
uint32_t cycles_lo, cycles_hi0, cycles_hi1;
// Implemented in assembly because Clang insisted on branching.
asm volatile(
"rdcycleh %0\n"
"rdcycle %1\n"
"rdcycleh %2\n"
"sub %0, %0, %2\n"
"seqz %0, %0\n"
"sub %0, zero, %0\n"
"and %1, %1, %0\n"
: "=r"(cycles_hi0), "=r"(cycles_lo), "=r"(cycles_hi1));
"rdcycleh %0\n"
"rdcycle %1\n"
"rdcycleh %2\n"
"sub %0, %0, %2\n"
"seqz %0, %0\n"
"sub %0, zero, %0\n"
"and %1, %1, %0\n"
: "=r"(cycles_hi0), "=r"(cycles_lo), "=r"(cycles_hi1));
return (static_cast<uint64_t>(cycles_hi1) << 32) | cycles_lo;
#elif defined(__riscv) && __riscv_xlen == 64
uint64_t cycles;