This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, rs6000, libitm] Enable Hardware Transactional Memory (HTM) support on Power
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>, Michael Meissner <meissner at linux dot ibm dot com>, Pat Haugen <pthaugen at us dot ibm dot com>
- Date: Mon, 15 Jul 2013 10:23:20 -0500
- Subject: Re: [PATCH, rs6000, libitm] Enable Hardware Transactional Memory (HTM) support on Power
- References: <1372734758 dot 4736 dot 149 dot camel at otta> <CAGWvny=8o0CUt7u03S_ueL7x3z66QG0LHfhf-PotTTEmPBdkHg at mail dot gmail dot com>
On Thu, 2013-07-04 at 12:02 -0400, David Edelsohn wrote:
> The expanders in htm.md 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);
+ 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.