qemu/include/user/tswap-target.h
Philippe Mathieu-Daudé 827238668e exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h'
tswapl() and bswaptls() are target-dependent and only used
by user emulation. Move their definitions to a new header:
"exec/user/tswap-target.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20231212123401.37493-17-philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2024-04-26 17:03:05 +02:00

23 lines
400 B
C

/*
* target-specific swap() definitions
*
* Copyright (c) 2003 Fabrice Bellard
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef USER_TSWAP_H
#define USER_TSWAP_H
#include "exec/cpu-defs.h"
#include "exec/tswap.h"
#if TARGET_LONG_SIZE == 4
#define tswapl(s) tswap32(s)
#define bswaptls(s) bswap32s(s)
#else
#define tswapl(s) tswap64(s)
#define bswaptls(s) bswap64s(s)
#endif
#endif