This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Gas for IA64 does not correctly detect dependencies in auto mode
- From: Jim Wilson <wilson at tuliptree dot org>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sources dot redhat dot com, smirnios at sybase dot com
- Date: 06 Apr 2003 11:31:55 -0400
- Subject: Re: Gas for IA64 does not correctly detect dependencies in auto mode
- References: <001901c2f561$3d0e5ee0$548f1fac@sybase.com> <m33ckzr9op.fsf@workshop.nickc.cambridge.redhat.com>
> > When using auto mode for IA64 assembly, gas does not correctly detect
> > register dependencies.
> > .auto
> > ldfs f8=[r32]
> > stfd [r33]=f8
This is a bug in the Intel supplied Dependency Violation (DV) tables.
In the Intel Itanium Architecture Software Developer's Manual (IIASDM),
vol 3, revision 2.1, page 342, table 5-2, says that there is a RAW DV
for a FR% register if fr-writers is followed by fr-readers.
fr-readers is defined on page 352, table 5-5. It includes arith
operations (e.g. add), non-arith operations (e.g. and), and a few other
things, but it does not include stf. This looks like a bug in the Intel
documentation.
We need to report this bug to Intel, and get a documentation errata or
update, and then feed the change back into the binutils sources. I will
try to start the process by sending mail to ia64-linux at linuxia64 dot org dot
Meanwhile, we can make a reasonable guess about what Intel will do to
solve the problem. I have included a patch to opcodes/ia64-ic.tbl that
solves the problem below.
I don't have access to Itanium hardware at the moment, so I can't test
this other than with a binutils make check. This passes.
This patch requires regenerating opcodes/ia64-asmtab.c. I haven't
included a patch for that. (The easy way to regenerate it is to edit
opcodes/Makefile and delete the # comment char in the ia64-asmtab.c
rule.)
I am leaving tomorrow on a 4000 km international move, so I will be
offline for a week or two.
Jim
opcodes/ChangeLog
2003-04-06 James E Wilson <wilson at tuliptree dot org>
* ia64-ic.tbl (fr-readers): Add mem-writers-fp.
* ia64-asmtab.c: Regenerate.
Index: ia64-ic.tbl
===================================================================
RCS file: /cvs/src/src/opcodes/ia64-ic.tbl,v
retrieving revision 1.7
diff -p -r1.7 ia64-ic.tbl
*** ia64-ic.tbl 5 Dec 2002 02:08:02 -0000 1.7
--- ia64-ic.tbl 6 Apr 2003 15:07:11 -0000
*************** fpcmp-s0; fpcmp[Field(sf)==s0]
*** 20,26 ****
fpcmp-s1; fpcmp[Field(sf)==s1]
fpcmp-s2; fpcmp[Field(sf)==s2]
fpcmp-s3; fpcmp[Field(sf)==s3]
! fr-readers; IC:fp-arith, IC:fp-non-arith, IC:pr-writers-fp, chk.s[Format in {M21}], getf
fr-writers; IC:fp-arith, IC:fp-non-arith\fclass, IC:mem-readers-fp, setf
gr-readers; IC:gr-readers-writers, IC:mem-readers, IC:mem-writers, chk.s, cmp, cmp4, fc, itc.i, itc.d, itr.i, itr.d, IC:mov-to-AR-gr, IC:mov-to-BR, IC:mov-to-CR, IC:mov-to-IND, IC:mov-from-IND, IC:mov-to-PR-allreg, IC:mov-to-PSR-l, IC:mov-to-PSR-um, IC:probe-all, ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d, setf, tbit, tnat
gr-readers-writers; IC:mov-from-IND, add, addl, addp4, adds, and, andcm, IC:czx, dep\dep[Format in {I13}], extr, IC:mem-readers-int, IC:ld-all-postinc, IC:lfetch-postinc, IC:mix, IC:mux, or, IC:pack, IC:padd, IC:pavg, IC:pavgsub, IC:pcmp, IC:pmax, IC:pmin, IC:pmpy, IC:pmpyshr, popcnt, IC:probe-nofault, IC:psad, IC:pshl, IC:pshladd, IC:pshr, IC:pshradd, IC:psub, shl, shladd, shladdp4, shr, shrp, IC:st-postinc, sub, IC:sxt, tak, thash, tpa, ttag, IC:unpack, xor, IC:zxt
--- 20,26 ----
fpcmp-s1; fpcmp[Field(sf)==s1]
fpcmp-s2; fpcmp[Field(sf)==s2]
fpcmp-s3; fpcmp[Field(sf)==s3]
! fr-readers; IC:fp-arith, IC:fp-non-arith, IC:pr-writers-fp, chk.s[Format in {M21}], getf, IC:mem-writers-fp
fr-writers; IC:fp-arith, IC:fp-non-arith\fclass, IC:mem-readers-fp, setf
gr-readers; IC:gr-readers-writers, IC:mem-readers, IC:mem-writers, chk.s, cmp, cmp4, fc, itc.i, itc.d, itr.i, itr.d, IC:mov-to-AR-gr, IC:mov-to-BR, IC:mov-to-CR, IC:mov-to-IND, IC:mov-from-IND, IC:mov-to-PR-allreg, IC:mov-to-PSR-l, IC:mov-to-PSR-um, IC:probe-all, ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d, setf, tbit, tnat
gr-readers-writers; IC:mov-from-IND, add, addl, addp4, adds, and, andcm, IC:czx, dep\dep[Format in {I13}], extr, IC:mem-readers-int, IC:ld-all-postinc, IC:lfetch-postinc, IC:mix, IC:mux, or, IC:pack, IC:padd, IC:pavg, IC:pavgsub, IC:pcmp, IC:pmax, IC:pmin, IC:pmpy, IC:pmpyshr, popcnt, IC:probe-nofault, IC:psad, IC:pshl, IC:pshladd, IC:pshr, IC:pshradd, IC:psub, shl, shladd, shladdp4, shr, shrp, IC:st-postinc, sub, IC:sxt, tak, thash, tpa, ttag, IC:unpack, xor, IC:zxt