summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorPaolo Bonzini2020-06-23 21:54:25 +0200
committerPaolo Bonzini2020-06-26 15:39:40 +0200
commitc8d7fd059d73a7d3035e379c319034c30ba3dbbf (patch)
tree9fcd7e57d550053506a30f724af494e0983a4a67 /hw
parentvmport: move compat properties to hw_compat_5_0 (diff)
downloadqemu-c8d7fd059d73a7d3035e379c319034c30ba3dbbf.tar.gz
qemu-c8d7fd059d73a7d3035e379c319034c30ba3dbbf.tar.xz
qemu-c8d7fd059d73a7d3035e379c319034c30ba3dbbf.zip
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/char/ibex_uart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/char/ibex_uart.c b/hw/char/ibex_uart.c
index 3e0dd9968e..45cd724998 100644
--- a/hw/char/ibex_uart.c
+++ b/hw/char/ibex_uart.c
@@ -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;
}