1 Disable the valgrind helpers which use MIPS floating point operations
2 when floating point support is deactivated in the toolchain.
4 The fix from this commit is not sufficient any more:
5 https://sourceware.org/git/?p=valgrind.git;a=commitdiff;h=869fcf2f6739f17b4eff36ec68f8dca826c8afeb
7 This fixes the following error message when compiling with a GCC 10 MIPS BE 32:
8 ---------------------------------------------------------
9 ../VEX/priv/guest_mips_helpers.c: In function 'mips_dirtyhelper_calculate_FCSR_fp32':
10 ../VEX/priv/guest_mips_helpers.c:640:10: error: the register '$f21' cannot be clobbered in 'asm' for the current target
11 640 | ASM_VOLATILE_UNARY32_DOUBLE(round.w.d)
13 ---------------------------------------------------------
15 --- a/VEX/priv/guest_mips_helpers.c
16 +++ b/VEX/priv/guest_mips_helpers.c
17 @@ -616,6 +616,7 @@ extern UInt mips_dirtyhelper_calculate_F
21 +#ifndef __mips_soft_float
23 VexGuestMIPS32State* guest_state = (VexGuestMIPS32State*)gs;
24 UInt loFsVal, hiFsVal, loFtVal, hiFtVal;
25 @@ -698,6 +699,7 @@ extern UInt mips_dirtyhelper_calculate_F
33 @@ -707,6 +709,7 @@ extern UInt mips_dirtyhelper_calculate_F
37 +#ifndef __mips_soft_float
38 #if defined(__mips__) && ((__mips == 64) || \
39 (defined(__mips_isa_rev) && (__mips_isa_rev >= 2)))
40 #if defined(VGA_mips32)
41 @@ -859,6 +862,7 @@ extern UInt mips_dirtyhelper_calculate_F
49 --- a/coregrind/m_machine.c
50 +++ b/coregrind/m_machine.c
51 @@ -2109,6 +2109,7 @@ Bool VG_(machine_get_hwcaps)( void )
52 we are using alternative way to determine FP mode */
55 +#ifndef __mips_soft_float
56 if (!VG_MINIMAL_SETJMP(env_unsup_insn)) {
59 @@ -2126,6 +2127,9 @@ Bool VG_(machine_get_hwcaps)( void )
61 fpmode = (result != 0x3FF0000000000000ull);