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
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/>.
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.
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.
(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.
Created attachment 12431 [details] 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:~$
Created attachment 12432 [details] 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:~$
Created attachment 12433 [details] 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:~$