public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/15445] New: spurious dependency-violation warnings
@ 2004-05-15 11:45 davidm at hpl dot hp dot com
  2004-05-15 12:33 ` [Bug target/15445] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: davidm at hpl dot hp dot com @ 2004-05-15 11:45 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15445] spurious dependency-violation warnings
  2004-05-15 11:45 [Bug target/15445] New: spurious dependency-violation warnings davidm at hpl dot hp dot com
@ 2004-05-15 12:33 ` pinskia at gcc dot gnu dot org
  2004-05-15 13:16 ` davidm at hpl dot hp dot com
  2004-05-17 13:30 ` wilson at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-15 12:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-14 19:03 -------
If that is the case why are you reporting this bug to GCC when you should be reporting it to 
binutils, they have their own bugzilla at >http://sources.redhat.com/bugzilla/>.

-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15445] spurious dependency-violation warnings
  2004-05-15 11:45 [Bug target/15445] New: spurious dependency-violation warnings davidm at hpl dot hp dot com
  2004-05-15 12:33 ` [Bug target/15445] " pinskia at gcc dot gnu dot org
@ 2004-05-15 13:16 ` davidm at hpl dot hp dot com
  2004-05-17 13:30 ` wilson at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: davidm at hpl dot hp dot com @ 2004-05-15 13:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From davidm at hpl dot hp dot com  2004-05-14 19:17 -------
Sorry if I wasn't being clear.  There is nothing the assembler can do about it
(short of solving the halting problem).  This needs to be handled at the GCC
level (e.g., by emitting .pred.rel.mutex directives as necessary).

BTW: I'm submitted this bug-report per request from Jim Wilson.

-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15445] spurious dependency-violation warnings
  2004-05-15 11:45 [Bug target/15445] New: spurious dependency-violation warnings davidm at hpl dot hp dot com
  2004-05-15 12:33 ` [Bug target/15445] " pinskia at gcc dot gnu dot org
  2004-05-15 13:16 ` davidm at hpl dot hp dot com
@ 2004-05-17 13:30 ` wilson at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: wilson at gcc dot gnu dot org @ 2004-05-17 13:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wilson at gcc dot gnu dot org  2004-05-16 23:46 -------
This is partly a compiler problem, and partly a binutils problem.  This bug
exists to document the fact that gcc/gas don't handle dependency violation
issues correctly in all instances.

I don't plan to work on this immediately, but at least assigning it to me makes
it clear who to ask if there are questions about this bug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |wilson at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-05-16 23:46:55
               date|                            |


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15445] spurious dependency-violation warnings
       [not found] <bug-15445-1013@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-10-14 22:17 ` tbm at cyrius dot com
@ 2006-10-14 23:29 ` tbm at cyrius dot com
  3 siblings, 0 replies; 8+ messages in thread
From: tbm at cyrius dot com @ 2006-10-14 23:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from tbm at cyrius dot com  2006-10-14 23:29 -------
Created an attachment (id=12433)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12433&action=view)
testcase

tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c nethack-cmd.c
tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O2 nethack-cmd.c
nethack-cmd.c: In function 'enlightenment':
nethack-cmd.c:44: warning: passing argument 1 of 'enlght_combatinc' makes
integer from pointer without a cast
/tmp/ccS5a0sQ.s: Assembler messages:
/tmp/ccS5a0sQ.s:228: Warning: Use of 'addl' may violate WAW dependency 'GR%, %
in 1 - 127' (impliedf), specific resource number is 33
/tmp/ccS5a0sQ.s:228: Warning: Only the first path encountering the conflict is
reported
/tmp/ccS5a0sQ.s:226: Warning: This is the location of the conflicting usage
/tmp/ccS5a0sQ.s:240: Warning: Use of 'ld8.mov' may violate RAW dependency 'GR%,
% in 1 - 127' (impliedf), specific resource number is 33
/tmp/ccS5a0sQ.s:239: Warning: This is the location of the conflicting usage
/tmp/ccS5a0sQ.s:240: Warning: Use of 'ld8.mov' may violate WAW dependency 'GR%,
% in 1 - 127' (impliedf), specific resource number is 33
/tmp/ccS5a0sQ.s:239: Warning: This is the location of the conflicting usage
tbm@coconut0:~$ gcc-3.4 -c -O2 nethack-cmd.c
In file included from nethack-cmd.c:44:
nethack-cmd.c: In function `enlightenment':
nethack-cmd.c:25: warning: passing arg 1 of `enlght_combatinc' makes integer
from pointer without a cast
tbm@coconut0:~$


-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15445] spurious dependency-violation warnings
       [not found] <bug-15445-1013@http.gcc.gnu.org/bugzilla/>
  2006-09-19 14:36 ` tbm at cyrius dot com
  2006-10-14 21:55 ` tbm at cyrius dot com
@ 2006-10-14 22:17 ` tbm at cyrius dot com
  2006-10-14 23:29 ` tbm at cyrius dot com
  3 siblings, 0 replies; 8+ messages in thread
From: tbm at cyrius dot com @ 2006-10-14 22:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from tbm at cyrius dot com  2006-10-14 22:17 -------
Created an attachment (id=12432)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12432&action=view)
testcase

tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c sfront-readmidi.c
tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O2 sfront-readmidi.c
/tmp/ccJHp78N.s: Assembler messages:
/tmp/ccJHp78N.s:55: Warning: Use of 'mov' may violate WAW dependency 'GR%, % in
1 - 127' (impliedf), specific resource number is 16
/tmp/ccJHp78N.s:55: Warning: Only the first path encountering the conflict is
reported
/tmp/ccJHp78N.s:54: Warning: This is the location of the conflicting usage
tbm@coconut0:~$ gcc-3.4 -c -O2 sfront-readmidi.c
tbm@coconut0:~$


-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15445] spurious dependency-violation warnings
       [not found] <bug-15445-1013@http.gcc.gnu.org/bugzilla/>
  2006-09-19 14:36 ` tbm at cyrius dot com
@ 2006-10-14 21:55 ` tbm at cyrius dot com
  2006-10-14 22:17 ` tbm at cyrius dot com
  2006-10-14 23:29 ` tbm at cyrius dot com
  3 siblings, 0 replies; 8+ messages in thread
From: tbm at cyrius dot com @ 2006-10-14 21:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from tbm at cyrius dot com  2006-10-14 21:55 -------
Created an attachment (id=12431)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12431&action=view)
testcase

tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c gqmpeg-ui2_display.c
tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O2 gqmpeg-ui2_display.c
/tmp/ccxbqBMW.s: Assembler messages:
/tmp/ccxbqBMW.s:91: Warning: Use of 'adds' may violate WAW dependency 'GR%, %
in 1 - 127' (impliedf), specific resource number is 14
/tmp/ccxbqBMW.s:90: Warning: This is the location of the conflicting usage
/tmp/ccxbqBMW.s:95: Warning: Use of 'ld8' may violate WAW dependency 'GR%, % in
1 - 127' (impliedf), specific resource number is 8
/tmp/ccxbqBMW.s:94: Warning: This is the location of the conflicting usage
tbm@coconut0:~$ gcc-3.4 -c -O2 gqmpeg-ui2_display.c
tbm@coconut0:~$


-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15445] spurious dependency-violation warnings
       [not found] <bug-15445-1013@http.gcc.gnu.org/bugzilla/>
@ 2006-09-19 14:36 ` tbm at cyrius dot com
  2006-10-14 21:55 ` tbm at cyrius dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: tbm at cyrius dot com @ 2006-09-19 14:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tbm at cyrius dot com  2006-09-19 14:36 -------
(In reply to comment #3)
> This is partly a compiler problem, and partly a binutils problem.  This bug
> exists to document the fact that gcc/gas don't handle dependency violation
> issues correctly in all instances.
> 
> I don't plan to work on this immediately, but at least assigning it to me makes
> it clear who to ask if there are questions about this bug.

Do you have any plans to work on this in the near future?  Would it help it
have
some testcases?  I noticed a number of such warnings while compiling the Debian
archive with gcc 4.2.  Some appear to be regressions from 3.4.


-- 

tbm at cyrius dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tbm at cyrius dot com


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-10-14 23:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-15 11:45 [Bug target/15445] New: spurious dependency-violation warnings davidm at hpl dot hp dot com
2004-05-15 12:33 ` [Bug target/15445] " pinskia at gcc dot gnu dot org
2004-05-15 13:16 ` davidm at hpl dot hp dot com
2004-05-17 13:30 ` wilson at gcc dot gnu dot org
     [not found] <bug-15445-1013@http.gcc.gnu.org/bugzilla/>
2006-09-19 14:36 ` tbm at cyrius dot com
2006-10-14 21:55 ` tbm at cyrius dot com
2006-10-14 22:17 ` tbm at cyrius dot com
2006-10-14 23:29 ` tbm at cyrius dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).