Files
Pierrick Bouvier 6183ff5953 tcg: prefix helpers with target base architecture
Now we made sure all helpers and helper_info are defined and used using
HELPER/HELPER_INFO macros, we are ready to introduce a target prefix.

We can't reuse TARGET_ARCH since it's not defined for common code, and
it's also poisoned. So introduce a new TARGET_ARCH_PREFIX which is
defined for all target code (whether it's common or target specific),
and use it as prefix.

On some hosts (found it on sparc), predefined macros exist for the base
architecture names we use, and their value is 1. (#define sparc 1). So,
we can't use them directly or it would create a illformed identifier for
function names. So to prevent any problem, use additional "target",
which gives -DTARGET_ARCH_PREFIX=target_<TARGET_ARCH>.

Finally there is one last catch: beyond target helpers, tcg also has
common helpers. For those ones, we want an empty prefix, since they are
defined on tcg side and not target side.

With this, we now have target prefixed helpers, preventing symbol
conflicts when linking targets together.

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Link: https://lore.kernel.org/qemu-devel/20261024163249.77855-5-pierrick.bouvier@oss.qualcomm.com
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
2026-10-24 17:36:09 +00:00
..
2023-06-05 12:04:29 -07:00
2023-06-05 12:04:29 -07:00
2026-02-09 20:51:52 +01:00