Guard the native endian APIs we want to remove by surrounding
them with TARGET_USE_LEGACY_NATIVE_ENDIAN_API #ifdef'ry.

Once a target gets cleaned we'll unset the definition in the
target config, then the target won't be able to use the legacy
API anymore.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
 include/exec/translator.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/exec/translator.h b/include/exec/translator.h
index 3c326555696..30e6596c5d7 100644
--- a/include/exec/translator.h
+++ b/include/exec/translator.h
@@ -188,7 +188,7 @@ uint32_t translator_ldl_end(CPUArchState *env, 
DisasContextBase *db,
 uint64_t translator_ldq_end(CPUArchState *env, DisasContextBase *db,
                             vaddr pc, MemOp endian);
 
-#ifdef COMPILING_PER_TARGET
+#if defined(TARGET_USE_LEGACY_NATIVE_ENDIAN_API) && 
defined(COMPILING_PER_TARGET)
 static inline uint16_t
 translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc)
 {
-- 
2.52.0


Reply via email to