提交 c8d7fd05 编写于 作者: P Paolo Bonzini

ibex_uart: fix XOR-as-pow

The xor-as-pow warning in clang actually detected a genuine bug.
Fix it.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 f983ff95
......@@ -331,7 +331,7 @@ static void ibex_uart_write(void *opaque, hwaddr addr,
if (value & UART_CTRL_NCO) {
uint64_t baud = ((value & UART_CTRL_NCO) >> 16);
baud *= 1000;
baud /= 2 ^ 20;
baud >>= 20;
s->char_tx_time = (NANOSECONDS_PER_SECOND / baud) * 10;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册