aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-12-14 01:32:10 +0100
committerLaurent Vivier <laurent@vivier.eu>2020-12-17 10:34:59 +0100
commit6dd97bfc1fd4453c4855109dd508a78617527a6e (patch)
tree468468b2d3fea830fdf147788b16376ae9c8d2e1
parent56d190848b9b8ecb8213835b0d2d05b243bcb5b8 (diff)
downloadqemu-6dd97bfc1fd4453c4855109dd508a78617527a6e.zip
qemu-6dd97bfc1fd4453c4855109dd508a78617527a6e.tar.gz
qemu-6dd97bfc1fd4453c4855109dd508a78617527a6e.tar.bz2
linux-user/elfload: Move GET_FEATURE macro out of get_elf_hwcap() body
As we are going to add more macros, keep the function body clear. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201214003215.344522-2-f4bug@amsat.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r--linux-user/elfload.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 0b02a92..aae28fd 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -989,22 +989,22 @@ enum {
#define ELF_HWCAP get_elf_hwcap()
+#define GET_FEATURE(_flag, _hwcap) \
+ do { if (cpu->env.insn_flags & (_flag)) { hwcaps |= _hwcap; } } while (0)
+
static uint32_t get_elf_hwcap(void)
{
MIPSCPU *cpu = MIPS_CPU(thread_cpu);
uint32_t hwcaps = 0;
-#define GET_FEATURE(flag, hwcap) \
- do { if (cpu->env.insn_flags & (flag)) { hwcaps |= hwcap; } } while (0)
-
GET_FEATURE(ISA_MIPS32R6 | ISA_MIPS64R6, HWCAP_MIPS_R6);
GET_FEATURE(ASE_MSA, HWCAP_MIPS_MSA);
-#undef GET_FEATURE
-
return hwcaps;
}
+#undef GET_FEATURE
+
#endif /* TARGET_MIPS */
#ifdef TARGET_MICROBLAZE