[PATCH-for-6.1? v2] target/nios2: Mark raise_exception() as noreturn

Philippe Mathieu-Daudé posted 1 patch 2 years, 9 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210729101315.2318714-1-f4bug@amsat.org
target/nios2/helper.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH-for-6.1? v2] target/nios2: Mark raise_exception() as noreturn
Posted by Philippe Mathieu-Daudé 2 years, 9 months ago
Raised exceptions don't return, so mark the helper with
noreturn.

Fixes: 032c76bc6f9 ("nios2: Add architecture emulation support")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
v2: use TCG_CALL_NO_WG instead of noreturn (rth)

Probably too late for 6.1, sorry I simply forgot to resend this patch
(and remember about it reviewing "Unaligned accesses for user-only"
https://www.mail-archive.com/qemu-devel@nongnu.org/msg826977.html)
---
 target/nios2/helper.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/nios2/helper.h b/target/nios2/helper.h
index b0cb9146a5f..6c8f0b5b356 100644
--- a/target/nios2/helper.h
+++ b/target/nios2/helper.h
@@ -18,7 +18,7 @@
  * <http://www.gnu.org/licenses/lgpl-2.1.html>
  */
 
-DEF_HELPER_2(raise_exception, void, env, i32)
+DEF_HELPER_FLAGS_2(raise_exception, TCG_CALL_NO_WG, noreturn, env, i32)
 
 #if !defined(CONFIG_USER_ONLY)
 DEF_HELPER_2(mmu_read_debug, void, env, i32)
-- 
2.31.1

Re: [PATCH-for-6.1? v2] target/nios2: Mark raise_exception() as noreturn
Posted by Richard Henderson 2 years, 9 months ago
On 7/29/21 12:13 AM, Philippe Mathieu-Daudé wrote:
> Raised exceptions don't return, so mark the helper with
> noreturn.
> 
> Fixes: 032c76bc6f9 ("nios2: Add architecture emulation support")
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

Re: [PATCH-for-6.1? v2] target/nios2: Mark raise_exception() as noreturn
Posted by Richard Henderson 2 years, 9 months ago
On 7/29/21 9:13 AM, Richard Henderson wrote:
> On 7/29/21 12:13 AM, Philippe Mathieu-Daudé wrote:
>> Raised exceptions don't return, so mark the helper with
>> noreturn.
>>
>> Fixes: 032c76bc6f9 ("nios2: Add architecture emulation support")
>> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
>> ---
> 
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

I'm going to queue this for 6.1, since I have another bug that wants pulling and this is 
trivial.


r~