[patch, mips] Fix for loongson prefetching and -mabi=32

Richard Sandiford rdsandiford@googlemail.com
Tue Aug 13 07:59:00 GMT 2013


"Steve Ellcey " <sellcey@mips.com> writes:
> diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
> index 397c40a..ad03040 100644
> --- a/gcc/config/mips/mips.md
> +++ b/gcc/config/mips/mips.md
> @@ -6674,7 +6674,10 @@
>  {
>    if (TARGET_LOONGSON_2EF || TARGET_LOONGSON_3A)
>      /* Loongson 2[ef] and Loongson 3a use load to $0 to perform prefetching.  */
> -    return "ld\t$0,%a0";
> +    if (TARGET_64BIT)
> +      return "ld\t$0,%a0";
> +    else
> +      return "lw\t$0,%a0";
>    operands[1] = mips_prefetch_cookie (operands[1], operands[2]);
>    return "pref\t%1,%a0";
>  }

The inner "if" needs to be wrapped in braces to avoid a warning.
OK with that change, thanks.

Richard



More information about the Gcc-patches mailing list