This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

gas/config/tc-ia64.c patch for two ia64-linux gas testsuite failures


I have checked in this patch which fixes two ia64-linux gas testsuite failures.
FAIL: ia64 dv-raw-err
FAIL: ia64 dv-waw-err

The problem here is that is_conditional_branch wasn't meant to include the
modulo scheduled branches, because they affect resources differently than
normal conditional branches.

This was broken by my 2001-04-13 gas patch.  It is my fault for not testing
the patch against the testsuite.  I was misled by the fact that the function
doesn't actually do what the explanatory comments and the function name imply
that it does.  I fixed that too.

2001-07-04  Jim Wilson  <wilson@redhat.com>

	* config/tc-ia64.c (is_conditional_branch): Rewrite to exclude mod
	sched branches.

Index: tc-ia64.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ia64.c,v
retrieving revision 1.51
diff -p -r1.51 tc-ia64.c
*** tc-ia64.c	2001/05/11 12:36:46	1.51
--- tc-ia64.c	2001/07/05 02:15:29
*************** ia64_canonicalize_symbol_name (name)
*** 6914,6932 ****
    return name;
  }
  
! /* Return true if idesc is a conditional branch instruction.  */
  
  static int
  is_conditional_branch (idesc)
       struct ia64_opcode *idesc;
  {
    /* br is a conditional branch.  Everything that starts with br. except
!      br.ia is a conditional branch.  Everything that starts with brl is a
!      conditional branch.  */
    return (idesc->name[0] == 'b' && idesc->name[1] == 'r'
  	  && (idesc->name[2] == '\0'
! 	      || (idesc->name[2] == '.' && idesc->name[3] != 'i')
! 	      || idesc->name[2] == 'l'));
  }
  
  /* Return whether the given opcode is a taken branch.  If there's any doubt,
--- 6914,6942 ----
    return name;
  }
  
! /* Return true if idesc is a conditional branch instruction.  This excludes
!    the modulo scheduled branches, and br.ia.  Mod-sched branches are excluded
!    because they always read/write resources regardless of the value of the
!    qualifying predicate.  br.ia must always use p0, and hence is always
!    taken.  Thus this function returns true for branches which can fall
!    through, and which use no resources if they do fall through.  */
  
  static int
  is_conditional_branch (idesc)
       struct ia64_opcode *idesc;
  {
    /* br is a conditional branch.  Everything that starts with br. except
!      br.ia, br.c{loop,top,exit}, and br.w{top,exit} is a conditional branch.
!      Everything that starts with brl is a conditional branch.  */
    return (idesc->name[0] == 'b' && idesc->name[1] == 'r'
  	  && (idesc->name[2] == '\0'
! 	      || (idesc->name[2] == '.' && idesc->name[3] != 'i'
! 		  && idesc->name[3] != 'c' && idesc->name[3] != 'w')
! 	      || idesc->name[2] == 'l'
! 	      /* br.cond, br.call, br.clr  */
! 	      || (idesc->name[2] == '.' && idesc->name[3] == 'c'
! 		  && (idesc->name[4] == 'a' || idesc->name[4] == 'o'
! 		      || (idesc->name[4] == 'l' && idesc->name[5] == 'r')))));
  }
  
  /* Return whether the given opcode is a taken branch.  If there's any doubt,


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