This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/15445] New: spurious dependency-violation warnings


There are corner-cases in which the GCC backend for ia64 generates code which,
to the assembler, looks as if there were a dependency-violation.  Basically, the
assembler doesn't have enough information to assert the validity/safety of the
code and it hence issues a warning message, which are usually (always?)
spurious.  It is difficult to give a specific test-case because small changes in
the compiler can result in different code and hence the problem keeps moving
around from release to release.  My recommendation is to build the Linux kernel
and to watch for any dependency-violation messages from the assembler.  With a
pre-release of GCC v3.5, the following example of such a spurious dependency
violation was observed:

Source file: net/drivers/bonding/bond_main.c

Warning message:

$ as -x drivers/net/bonding/bond_main.s
drivers/net/bonding/bond_main.s: Assembler messages:
drivers/net/bonding/bond_main.s:3409: Warning: Use of 'addl' may violate WAW
dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 42
drivers/net/bonding/bond_main.s:3408: Warning: This is the location of the
conflicting usage

Code in question:

	cmp4.eq p12, p13 = 6, r14
	addl r28 = @ltoffx(.LC26), r1
	mov r40 = r32 ;;

  (p13) cmp.eq p16, p17 = 0, r34
	ld8.mov r41 = [r28], .LC26
  (p12) br.cond.dpnt .L1108 ;;

  (p16) addl r42 = @ltoffx(.LC28), r1
  (p17) addl r42 = @ltoffx(.LC27), r1

-- 
           Summary: spurious dependency-violation warnings
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: davidm at hpl dot hp dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: ia64-linux
  GCC host triplet: ia64-linux
GCC target triplet: ia64-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15445


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