Skip to contentSkip to conversation

target/nios2: Mark raise_exception() as noreturn

PATCH Superseded Philippe Mathieu-Daudé 2 participants 2 messages May 31, 2021 – Jun 1, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/nios2: Mark raise_exception() as noreturn

Raised exceptions don't return, so mark the helper with TCG_CALL_NO_RETURN.

Fixes 032c76bc6f9 ("nios2: Add architecture emulation support")
---
 target/nios2/helper.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/nios2/helper.h +1 -1
index b0cb9146a5f..9bf14c128ed 100644
@@ -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_RETURN, noreturn, env, i32)
 
 #if !defined(CONFIG_USER_ONLY)
 DEF_HELPER_2(mmu_read_debug, void, env, i32)
Signature · 1 line
2.26.3
#1 lore raw
Quoted 14 lines · Philippe Mathieu-Daudé

Raised exceptions don't return, so mark the helper with TCG_CALL_NO_RETURN.

Fixes 032c76bc6f9 ("nios2: Add architecture emulation support")
---
  target/nios2/helper.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
target/nios2/helper.h +0 -0
index b0cb9146a5f..9bf14c128ed 100644

target/nios2/helper.h line 21

Quoted 5 lines
target/nios2/helper.h +1 -1
@@ -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_RETURN, noreturn, env, i32)

The noreturn is what you want for that.
For the flags, you probably want TCG_CALL_NO_WG.

Quoted 4 lines
target/nios2/helper.h +0 -0
  #if !defined(CONFIG_USER_ONLY)
  DEF_HELPER_2(mmu_read_debug, void, env, i32)