This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: x86_64 merger part 23 - arithmetic patterns


> Indeed, you do seem to have confused diff.  I've sussed my
> way through it, but it would be interesting to see if using
> the -d -H options would have helped produce nicer diffs.
Thanks for taking care. I was thinking about re-doing the patch in two
passes, first that changes existing pattern and second that adds new
ones. Next time I will do that, since I believe it is quite a bit easier
to review.

I will also play with -d/-H options.
> 
> > +   ; The first is simply short-hand for the latter.  But, some assemblers,
> > +   ; like the SCO OSR5 COFF assembler, don't handle the first form.
> 
> This comment probably isn't applicable to x86_64, don't you think.  ;-)
Sore, but it is also better to keep in sync with the 32bit form, so do you
think I should just kill the extra alternatives or add comment that 32bit
assemblers require this and we want to be in sync?
> > + (define_insn "*mulsi3_1_zext"
> > +   [(set (match_operand:DI 0 "register_operand" "=r,r,r")
> > + 	(zero_extend:DI
> > + 	  (mult:SI (match_operand:SI 1 "nonimmediate_operand" "%rm,0,0")
> > + 		   (match_operand:SI 2 "general_operand" "K,i,mr"))))
> > +    (clobber (reg:CC 17))]
> 
> > + (define_insn "*umulsi3_zext"
> > +   [(set (match_operand:DI 0 "register_operand" "=a")
> > + 	(zero_extend:DI
> > + 	  (mult:SI (match_operand:SI 1 "register_operand" "%0")
> > + 		   (match_operand:SI 2 "nonimmediate_operand" "rm"))))
> > +    (clobber (match_operand:SI 3 "register_operand" "=d"))
> > +    (clobber (reg:CC 17))]
> 
> Why do you have this second pattern at all?  Why would the compiler
> use this and clobber edx, when it can just use the first?
Duh, too much cut&paste&script programming I gues.
> > + (define_insn "*umuldi3_highpart_rex64"
> > +   [(set (match_operand:DI 0 "register_operand" "=d")
> > + 	(truncate:DI
> > + 	  (lshiftrt:TI
> > + 	    (mult:TI (zero_extend:TI
> > + 		       (match_operand:DI 1 "register_operand" "%a"))
> > + 		     (zero_extend:TI
> > + 		       (match_operand:DI 2 "nonimmediate_operand" "rm")))
> > + 	    (const_int 32))))
> 
> Shift by 64.
> 
> > + (define_insn "*smuldi3_highpart_rex64"
> 
> Likewise.
> 
> Otherwise ok.
Thanks a ton for revieweing the whole beast!

Honza
> 
> 
> r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]