This is the mail archive of the
mailing list for the GCC project.
Re: (R5900) Implementing Vector Support
- From: Richard Henderson <rth at redhat dot com>
- To: Woon yung Liu <ysai187 at yahoo dot com>, Gcc Mailing List <gcc at gcc dot gnu dot org>
- Date: Tue, 31 May 2016 14:44:51 -0700
- Subject: Re: (R5900) Implementing Vector Support
- Authentication-results: sourceware.org; auth=none
- References: <23a57920-3e9e-05f9-e428-a7e5e89d4de9 at redhat dot com> <133091800 dot 362759 dot 1462978450117 dot JavaMail dot yahoo at mail dot yahoo dot com> <93d40024-8baf-f571-765e-3f3ae59961df at redhat dot com> <687383190 dot 1940916 dot 1463221310394 dot JavaMail dot yahoo at mail dot yahoo dot com> <850bcd56-a219-a153-b467-8414fa19c207 at redhat dot com> <300510214 dot 326837 dot 1463573792037 dot JavaMail dot yahoo at mail dot yahoo dot com> <e7ccb4e0-6b37-ea2c-01bb-4fff2742ca32 at redhat dot com> <1735082185 dot 4758122 dot 1463655944237 dot JavaMail dot yahoo at mail dot yahoo dot com> <1809107277 dot 905923 dot 1464508754638 dot JavaMail dot yahoo at mail dot yahoo dot com>
On 05/29/2016 12:59 AM, Woon yung Liu wrote:
I have solved the problems with the mulv8hi3 pattern; I needed to adjust the code within mips.c to allow the double-sized vector modes and to allow vector modes into the LO+HI accumulators.
Yes, I should have mentioned that you would need to do that.
What is the correct way to change the mode of registers? For example, I am doing this to change the mode for a register to V4SI within an expand:
reg = gen_rtx_REG(V4SImode, REGNO (reg));
This is almost always incorrect, and certainly before reload.
You need to use gen_lowpart. There are examples in the code
fragments that I sent the other week.
Finally, what is the difference between define_expand and define_insn_and_split? When should I ever use define_insn_and_split?
You need to read the gcc internals documentation. They are all three different
uses, though there is some overlap between define_insn and define_expand.
Are define_insn_and_split patterns used to avoid pseudo registers?