Re: [PATCH] target/mips/mxu: Rewrite D16MIN / D16MAX opcodes

2021-03-16 Thread Philippe Mathieu-Daudé
Hi Peter, On 3/16/21 1:03 PM, Philippe Mathieu-Daudé wrote: > On 3/16/21 11:51 AM, Peter Maydell wrote: >> On Mon, 15 Mar 2021 at 22:39, Philippe Mathieu-Daudé wrote: >>> >>> Coverity reported (CID 1450831) an array overrun in >>> gen_mxu_D16MAX_D16MIN(): >>> >>> 1103 } else if

Re: [PATCH] target/mips/mxu: Rewrite D16MIN / D16MAX opcodes

2021-03-16 Thread Richard Henderson
On 3/16/21 4:51 AM, Peter Maydell wrote: On Mon, 15 Mar 2021 at 22:39, Philippe Mathieu-Daudé wrote: Coverity reported (CID 1450831) an array overrun in gen_mxu_D16MAX_D16MIN(): 1103 } else if (unlikely((XRb == 0) || (XRa == 0))) { 1112 if (opc == OPC_MXU_D16MAX) {

Re: [PATCH] target/mips/mxu: Rewrite D16MIN / D16MAX opcodes

2021-03-16 Thread Philippe Mathieu-Daudé
On 3/16/21 11:51 AM, Peter Maydell wrote: > On Mon, 15 Mar 2021 at 22:39, Philippe Mathieu-Daudé wrote: >> >> Coverity reported (CID 1450831) an array overrun in >> gen_mxu_D16MAX_D16MIN(): >> >> 1103 } else if (unlikely((XRb == 0) || (XRa == 0))) { >> >> 1112 if (opc ==

Re: [PATCH] target/mips/mxu: Rewrite D16MIN / D16MAX opcodes

2021-03-16 Thread Peter Maydell
On Mon, 15 Mar 2021 at 22:39, Philippe Mathieu-Daudé wrote: > > Coverity reported (CID 1450831) an array overrun in > gen_mxu_D16MAX_D16MIN(): > > 1103 } else if (unlikely((XRb == 0) || (XRa == 0))) { > > 1112 if (opc == OPC_MXU_D16MAX) { > 1113

[PATCH] target/mips/mxu: Rewrite D16MIN / D16MAX opcodes

2021-03-15 Thread Philippe Mathieu-Daudé
Coverity reported (CID 1450831) an array overrun in gen_mxu_D16MAX_D16MIN(): 1103 } else if (unlikely((XRb == 0) || (XRa == 0))) { 1112 if (opc == OPC_MXU_D16MAX) { 1113 tcg_gen_smax_i32(mxu_gpr[XRa - 1], t0, t1); 1114 } else { 1115