From mboxrd@z Thu Jan 1 00:00:00 1970 From: law@redhat.com To: "John David Anglin" Cc: gcc-patches@gcc.gnu.org Subject: Re: PATCH: Use PLUS instead of HIGH/LO_SUM for large constants - take 2 for PA Date: Tue, 13 Nov 2001 15:03:00 -0000 Message-ID: <1152.1005351650@porcupine.cygnus.com> References: <200110311839.f9VId8Pm014644@hiauly1.hia.nrc.ca> X-SW-Source: 2001-11.t/msg00665.html Message-ID: <20011113150300.bGJey6Bu0KeYFMmRV1f8vZRa4jc6WV5k-PzhlA2T3Fs@z> > > 2001-10-29 John David Anglin > > > > * pa.c (emit_move_sequence): Use cint_ok_for_move to check whether a > > constant can be loaded in a single instruction to a register. When > > loading immediate constants, use PLUS instead of HIGH/LO_SUM. Handle > > both zero and one extension of "32-bit" constants on 64-bit hosts. > > * pa.h (LEGITIMATE_CONSTANT_P): Accept constants that can be built > > with ldil/ldo/depdi instruction sequence on 64-bit hosts. > > * pa.md: New addmove pattern for adding constant_int to HImode > > register and moving result to HImode register. Remove HImode HIGH > > and LO_SUM patterns. > > After thinking more about the above patch, I realized that it was trivial > to extend the range of constants handled by 64-bits hosts compiling for > TARGET_64BIT. This changes the previous patch to take advantage of the > full im5 format used for immediates by the depdi instruction. Checked > on hppa1.1-hp-hpux10.20 but not on 64-bit host/target. This seems to be working fine for PA64 too. I went ahead and installed it. jeff