]> www.infradead.org Git - users/dwmw2/qemu.git/commit
target/i386: Remove dead assignment to ss in do_interrupt64()
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Jul 2024 16:25:25 +0000 (17:25 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Jul 2024 15:59:44 +0000 (16:59 +0100)
commitbde8adb808eeffb02fdcbd3425f09f1645bdcf4a
tree0f0a37fc0f0252ac53aa68052bc93bc149355e41
parent7d01623a1b0d282430a1e99fbe62068e27a4b4c4
target/i386: Remove dead assignment to ss in do_interrupt64()

Coverity points out that in do_interrupt64() in the "to inner
privilege" codepath we set "ss = 0", but because we also set
"new_stack = 1" there, later in the function we will always override
that value of ss with "ss = 0 | dpl".

Remove the unnecessary initialization of ss, which allows us to
reduce the scope of the variable to only where it is used.  Borrow a
comment from helper_lcall_protected() that explains what "0 | dpl"
means here.

Resolves: Coverity CID 1527395
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240723162525.1585743-1-peter.maydell@linaro.org
target/i386/tcg/seg_helper.c