mirror of https://github.com/xemu-project/xemu.git
ibex_uart: fix XOR-as-pow
The xor-as-pow warning in clang actually detected a genuine bug. Fix it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
f983ff95f4
commit
c8d7fd059d
|
@ -331,7 +331,7 @@ static void ibex_uart_write(void *opaque, hwaddr addr,
|
||||||
if (value & UART_CTRL_NCO) {
|
if (value & UART_CTRL_NCO) {
|
||||||
uint64_t baud = ((value & UART_CTRL_NCO) >> 16);
|
uint64_t baud = ((value & UART_CTRL_NCO) >> 16);
|
||||||
baud *= 1000;
|
baud *= 1000;
|
||||||
baud /= 2 ^ 20;
|
baud >>= 20;
|
||||||
|
|
||||||
s->char_tx_time = (NANOSECONDS_PER_SECOND / baud) * 10;
|
s->char_tx_time = (NANOSECONDS_PER_SECOND / baud) * 10;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue