From b5f8f063a79bbaba332a255da3c59cfb50522641 Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Tue, 13 Aug 2013 15:49:39 +0000 Subject: [PATCH] mips.md (prefetch): Use lw instead of ld on loongson in 32bit mode. 2013-08-13 Steve Ellcey * config/mips/mips.md (prefetch): Use lw instead of ld on loongson in 32bit mode. From-SVN: r201691 --- gcc/ChangeLog | 5 +++++ gcc/config/mips/mips.md | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7eb0748..2cf949b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-08-13 Steve Ellcey + + * config/mips/mips.md (prefetch): Use lw instead of ld on + loongson in 32bit mode. + 2013-08-13 Nick Clifton * config.gcc: (avr-linux): Allow for tmake_file not being empty. diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 397c40a..0cda169 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -6673,8 +6673,13 @@ "ISA_HAS_PREFETCH && TARGET_EXPLICIT_RELOCS" { 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"; + { + /* Loongson 2[ef] and Loongson 3a use load to $0 for prefetching. */ + 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"; } -- 2.7.4