diff mbox series

[v3,10/26] target/m68k: Use g_assert_not_reached in gen_lea_mode and gen_ea_mode

Message ID 20240909172823.649837-11-richard.henderson@linaro.org (mailing list archive)
State New, archived
Headers show
Series target/m68k: fpu improvements | expand

Commit Message

Richard Henderson Sept. 9, 2024, 5:28 p.m. UTC
The mode argument is extracted from 3 bits, and all cases are covered.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/m68k/translate.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Philippe Mathieu-Daudé Sept. 9, 2024, 10:03 p.m. UTC | #1
On 9/9/24 19:28, Richard Henderson wrote:
> The mode argument is extracted from 3 bits, and all cases are covered.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/m68k/translate.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 1ba1220b21..71dfa6d9a2 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -767,8 +767,7 @@  static TCGv gen_lea_mode(CPUM68KState *env, DisasContext *s,
         tcg_gen_movi_i32(tmp, offset);
         return tmp;
     }
-    /* Should never happen.  */
-    return NULL_QREG;
+    g_assert_not_reached();
 }
 
 static TCGv gen_lea(CPUM68KState *env, DisasContext *s, uint16_t insn,
@@ -892,8 +891,7 @@  static TCGv gen_ea_mode(CPUM68KState *env, DisasContext *s, int mode, int reg0,
             return NULL_QREG;
         }
     }
-    /* Should never happen.  */
-    return NULL_QREG;
+    g_assert_not_reached();
 }
 
 static TCGv_ptr gen_fp_ptr(int freg)