Browse Source
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>pull/266/head
13 changed files with 33 additions and 8 deletions
@ -0,0 +1,22 @@ |
|||||
|
/*
|
||||
|
* 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 |
||||
Loading…
Reference in new issue