This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [MIPS][LS3A]Generic Support


On Sat, Sep 18, 2010 at 5:15 PM, Richard Sandiford
<rdsandiford@googlemail.com> wrote:
> "Joseph S. Myers" <joseph@codesourcery.com> writes:
>> On Fri, 17 Sep 2010, Mingming Sun wrote:
>>> This patch adds generic support for Loongson 3A CPU such as -march and
>>> ?mtune options.
>
> Thanks for the patch. ?In addition to Joseph's comments:
>
>> The following is mostly a generic response that applies to any addition of
>> support for a new CPU for MIPS or many other processors:
>>
>> * The known CPU names are documented in doc/invoke.texi, your patch needs
>> to update that file.
>>
>> * You need to add costs data in the right place in mips_rtx_cost_data.
>>
>> * -march options are passed to the assembler so you need a corresponding
>> binutils patch as well to avoid getting assembler errors/warnings on every
>> compilation.
>
> I think this is big enough to require a copyright assignment, especially
> after the mips_rtx_cost_data change that Joseph mentions. ?Do you have
> an assignment on file?
>
> It might be worth adding a generic TARGET_LOONGSON macro, rather than
> having to test TARGET_LOONGSON_2EF || TARGET_LOONGSON_3A.
>
> Richard
>

I've got the GCC assignment and the binutils patch is applied.
This patch adds mips_rtx_cost_data in mips.c and loongson3a in
doc/invoke.texi.
Ok for trunk?

Thanks,
Mingming Sun


2010-09-21  Mingming Sun  <mingm.sun@gmail.com>
	* doc/invoke.texi (MIPS Options): Add loongson3a processor.
	* config/mips/mips.md (define_attr "cpu"): Add loongson_3a.
	(define_insn "prefetch"): Add TARGET_LOONGSON_3A.
	* config/mips/mips.h (TARGET_LOONGSON_3A): Define.
	(TUNE_LOONGSON_3A): Define.
	(TARGET_LOONGSON_VECTORS): Add TARGET_LOONGSON_3A.
	(MIPS_ISA_LEVEL_SPEC): Add loongson3a.
	* config/mips/mips.c (mips_cpu_info_table): Add loongson3a.
	(mips_issue_rate): Add PROCESSOR_LOONGSON_3A.
	(mips_rtx_cost_data): Add Loongson-3A.

Attachment: loongson3a.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]