RE: new mul* patterns "U" constraint in rl78

2013-06-11 Thread Kaushik Phatak
>> +;; [(set_attr "valloc" "umul")] >I think this one needs to be macax also, since the constraints have "v" in >them but the opcodes use ax. > Other than that, it's OK. Committed with above change. Thanks for the quick review. Regards, Kaushik

Re: new mul* patterns "U" constraint in rl78

2013-06-11 Thread DJ Delorie
> ; end of mulqi macro" > +;; [(set_attr "valloc" "umul")] I think this one needs to be macax also, since the constraints have "v" in them but the opcodes use ax. Other than that, it's OK.

RE: new mul* patterns "U" constraint in rl78

2013-06-11 Thread Kaushik Phatak
Hi DJ, > "umul" is used when the insn takes two operands in A and X, and computes a > value into AX. > "macax" is used when the insn pattern itself reads from two virtual registers > and writes to a > virtual register (i.e. V = V op V), but clobbers AX anx BC in the process. Thanks for the cl

Re: new mul* patterns "U" constraint in rl78

2013-06-10 Thread DJ Delorie
"umul" is used when the insn takes two operands in A and X, and computes a value into AX. This is similar to "op2" which, in general, does AX = AX op (other register or memory). The devirtualizer will arrange for the right values to be in real registers for these. "macax" is used when the insn

RE: new mul* patterns "U" constraint in rl78

2013-06-10 Thread Kaushik Phatak
Hi DJ, > Uses a "U" constraint. What should that constraint do? Could you post a > patch to add it? The U constraint was part of a source tree we worked on previously. I have provided the patch for it below. I have also set the valloc attribute for the multiplication insns to 'umul'. Would that