This is the mail archive of the 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]
Other format: [Raw text]

Re: [PATCH, rs6000, libitm] Enable Hardware Transactional Memory (HTM) support on Power

On Thu, 2013-07-04 at 12:02 -0400, David Edelsohn wrote:
> The expanders in should not include constraint letters.

That's the way I had the code originally, since they're not
needed for expand, but I added them later to improve the
error message when someone uses a builtin that takes an
integer constant argument and uses a value out of range.
Specifically, it is used by this part of the patch:

+         if (!(*insn_op->predicate) (op[nopnds], insn_op->mode))
+           {
+             if (!strcmp (insn_op->constraint, "n"))
+               {
+                 int arg_num = (nonvoid) ? nopnds : nopnds + 1;
+                 if (!CONST_INT_P (op[nopnds]))
+                   error ("argument %d must be an unsigned literal", arg_num);
+                 else
+                   error ("argument %d is an unsigned literal that is "
+                          "out of range", arg_num);
+                 return const0_rtx;
+               }
+             op[nopnds] = copy_to_mode_reg (insn_op->mode, op[nopnds]);
+           }

If you want, I can remove the constraints and the extra error
message.  Just let me know what you want.


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