qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 22/94] target/sparc: Move RDASR, STBAR, MEMBAR to decodetree


From: Richard Henderson
Subject: Re: [PULL 22/94] target/sparc: Move RDASR, STBAR, MEMBAR to decodetree
Date: Fri, 3 Nov 2023 15:54:18 -0700
User-agent: Mozilla Thunderbird

On 11/3/23 12:07, Peter Maydell wrote:
On Thu, 26 Oct 2023 at 01:25, Richard Henderson
<richard.henderson@linaro.org> wrote:

Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


+static TCGv do_rdgsr(DisasContext *dc, TCGv dst)
+{
+    gen_trap_ifnofpu(dc);
+    return cpu_gsr;
+}
+
+TRANS(RDGSR, 64, do_rd_special, true, a->rd, do_rdgsr)

Hi; Coverity complains (CID 1523706) that we don't check
the return value from this call to gen_trap_ifnofpu(),
whereas we do check it on all but one other call.
Is this OK?

Yes.

While gen_trap_ifnofpu may or may not trap, we must return a legal value for the calling wrapper function. If a trap is generated, the read of cpu_gsr will be removed as dead code.

For do_wrgsr, we *could* avoid generating the dead store to cpu_gsr, but avoiding that is not critical.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]