On Friday, July 8, 2005 1:17 pm, Luck, Tony wrote: > >I don't think this is really safe. There is nothing to stop the > >compiler from loading the value directly into the out register, > > which would again defer consumption of the value (especially if the > > caller of ia64_mca_barrier() got inlined itself. > > I'd thought that the value needs to go to both the "out" register, > and to "r8" to be returned from the function ... but you are right, > this can be by-passed if the function that calls ia64_mca_barrier is > itself inlined. > > >In my opinion, it would be safest to write this in assembly, so > > we're _guaranteed_ it will do what we want, no matter how smart the > > compilers get. Something along the lines of: > > > >ia64_mca_barrier: > > mov r8 = r32 > > br.ret.sptk.many rp > > > >should do (and I agree that this function needs a comment). > > So are you envisioning using it like this? > > val = ia64_mca_barrier(*(type *)ioaddr);
Why not be extra safe and call PAL_MC_FLUSH? Or would that be too expensive? Jesse - To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
