This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Update INSN_ADDRESSES for insns within a fixed length SEQUENCE.
- To: gcc-patches at gcc dot gnu dot org
- Subject: Update INSN_ADDRESSES for insns within a fixed length SEQUENCE.
- From: Graham Stott <grahams at redhat dot com>
- Date: Thu, 26 Jul 2001 20:39:48 +0100
All
While fixing a branch shortening failure on the MIPS I found it
annoying that instructions that are part of a fix length insn
which is a SEQUENCE don't have their INSN_ADDRESSES.
This patch updates the INSN_ADDRESSES for such instructions.
Bootstrapped and tested x86, mips and arm.
Graham
ChangeLog
* final.c (shorten_branches): Update the INSN_ADDRESSES of
insns within fixed length SEQUENCE.
---------------------------------------------------------------------------------
Index: final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.188
diff -c -p -r1.188 final.c
*** final.c 2001/07/26 06:56:12 1.188
--- final.c 2001/07/26 15:26:18
*************** shorten_branches (first)
*** 1445,1453 ****
if (! (varying_length[uid]))
{
! insn_current_address += insn_lengths[uid];
continue;
}
if (GET_CODE (insn) == INSN && GET_CODE (PATTERN (insn)) == SEQUENCE)
{
int i;
--- 1445,1472 ----
if (! (varying_length[uid]))
{
! if (GET_CODE (insn) == INSN
! && GET_CODE (PATTERN (insn)) == SEQUENCE)
! {
! int i;
!
! body = PATTERN (insn);
! for (i = 0; i < XVECLEN (body, 0); i++)
! {
! rtx inner_insn = XVECEXP (body, 0, i);
! int inner_uid = INSN_UID (inner_insn);
!
! INSN_ADDRESSES (inner_uid) = insn_current_address;
!
! insn_current_address += insn_lengths[inner_uid];
! }
! }
! else
! insn_current_address += insn_lengths[uid];
!
continue;
}
+
if (GET_CODE (insn) == INSN && GET_CODE (PATTERN (insn)) == SEQUENCE)
{
int i;
-------------------------------------------------------------------------------