summary refs log tree commit diff stats
path: root/target/sparc/ldst_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-10-16 13:23:15 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-10-25 01:01:12 -0700
commit186e78905a4fe69b62598af73903c6cf4df1f24f (patch)
treef6fb81cf42ed57fc280cbe0fcb689bcf77353374 /target/sparc/ldst_helper.c
parent930f1865cc654b637ffe1207fa5b44bf0a156279 (diff)
downloadfocaccia-qemu-186e78905a4fe69b62598af73903c6cf4df1f24f.tar.gz
focaccia-qemu-186e78905a4fe69b62598af73903c6cf4df1f24f.zip
target/sparc: Implement check_align inline
Emit the exception at the end of the translation block,
so that the non-exception case can fall through.

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>
Diffstat (limited to 'target/sparc/ldst_helper.c')
-rw-r--r--target/sparc/ldst_helper.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c
index 78b03308ae..246de86c98 100644
--- a/target/sparc/ldst_helper.c
+++ b/target/sparc/ldst_helper.c
@@ -360,6 +360,7 @@ static inline void do_check_asi(CPUSPARCState *env, int asi, uintptr_t ra)
 #endif /* !CONFIG_USER_ONLY */
 #endif
 
+#if defined(TARGET_SPARC64) || !defined(CONFIG_USER_ONLY)
 static void do_check_align(CPUSPARCState *env, target_ulong addr,
                            uint32_t align, uintptr_t ra)
 {
@@ -367,11 +368,7 @@ static void do_check_align(CPUSPARCState *env, target_ulong addr,
         cpu_raise_exception_ra(env, TT_UNALIGNED, ra);
     }
 }
-
-void helper_check_align(CPUSPARCState *env, target_ulong addr, uint32_t align)
-{
-    do_check_align(env, addr, align, GETPC());
-}
+#endif
 
 #if !defined(TARGET_SPARC64) && !defined(CONFIG_USER_ONLY) &&   \
     defined(DEBUG_MXCC)