This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend
- From: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: Jake Hamby <jehamby420 at me dot com>, Jan-Benedict Glaw <jbglaw at lug-owl dot de>, Christos Zoulas <christos at astron dot com>, port-vax at netbsd dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 2 May 2016 23:03:58 +0100 (BST)
- Subject: Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend
- Authentication-results: sourceware.org; auth=none
- References: <F48D0C6B-A6DB-410B-BC97-C30D4E8B4612 at me dot com> <ncu3pc$gkd$1 at ger dot gmane dot org> <DB0276A6-0A26-44F7-8FDC-D086EA40C709 at me dot com> <26D90386-F298-4EDD-A7D7-278F87DF3949 at me dot com> <64F034DF-BDB0-44F3-B4DB-937DEE2795E6 at me dot com> <009114AB-9D39-4A5B-9935-70C012855DB0 at me dot com> <244703AA-2698-41B6-824F-999E1BB61968 at me dot com> <46F08A58-7790-4D2E-8146-9E6B5A3930B0 at me dot com> <20160331143007 dot GL28138 at lug-owl dot de> <44A3B14F-0EA8-46F6-9D2B-C438FB6448DD at me dot com> <alpine dot LFD dot 2 dot 20 dot 1604020105020 dot 15981 at eddie dot linux-mips dot org> <3adf19a7-48c0-0abe-598f-9b933db7c68a at redhat dot com>
On Tue, 26 Apr 2016, Jeff Law wrote:
> > So offhand I think you need an RTL instruction splitter to express this,
> > and then avoid fetching 64 bits worth of data from memory -- for the sake
> > of matching the indexed addressing mode -- where you only need 32 bits.
> > At the hardware instruction level I'd use a scratch register (as with
> > MOVAQ you'd have to waste one anyway) to scale the index and then use
> > MOVAL instead with the modified index. Where no index is used it gets
> > simpler even as you can just bump up the displacement according to the
> > subreg offset.
> Note you shouldn't need an expander for this.
>
> That insn is just a 32bit load. I would have expected something to simplify
> the subreg expression, likely requiring loading the address into a register in
> the process.
Hmm, producing a MOVAQ/MOVL sequence (rather than fiddling with the index
register) will ensure any increment/decrement mode works just fine. This
observation also makes me agree with you in that we should always just
load the result of the original address expression somewhere; likely a
register, but on a VAX it could well be memory (though the indirect
address mode is not offsettable; not in the sense perhaps needed here), so
maybe we don't have to restrict that.
Maciej