On Monday, July 06, 2015 02:45:59 AM Francisco Jerez wrote:
> Matt Turner <matts...@gmail.com> writes:
> > On Fri, Jul 3, 2015 at 3:46 AM, Francisco Jerez <curroje...@riseup.net> 
> > wrote:
[snip]
> Yeah.  I did in fact try to implement uaddCarry last Friday without
> using the accumulator by doing something like:
> 
> | CMP.o tmp, src0, -src1
> | MOV dst, -tmp
> 
> ...what of course didn't work because of the extra argument precision
> post-source modifiers and also because the .o condmod doesn't work at
> all on CMP, but...
> 
> > Ideally, we'd recognize merge the addition and carry operations into a
> > single ADDC instruction, but it's pretty unimportant. It's all pretty
> > academic -- I've never seen an application use either operation (or
> > [iu]mulExtended either).
> 
> ...if we did the following instead:
> 
> | ADD tmp, src0, src1
> | CMP.l tmp, tmp, src0
> | MOV dst, -tmp
> 
> the ADD could be easily CSE'ed with the original ADD instruction (and
> the source modifier of the last MOV can also be easily propagated into
> some other instruction), so even though it seems like one instruction
> more than what we emit now it might be a net win (aside from it working
> on SIMD16).  usubBorrow is even easier:
> 
> | CMP.l tmp, src0, src1
> | MOV dst, -tmp
> 
> I was planning to run it through shader-db tomorrow but if you say
> you've never seen them used I guess I shouldn't get my hopes too high? :P

Yeah, there's nothing in shader-db that uses them, so I wouldn't bother.

I'm definitely a huge fan of avoiding the accumulator - it's always been
a total pain to deal with.  If you guys come up with a solution that
uses normal registers and avoids MACH, that sounds great to me.

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to