On Tue, Nov 1, 2016 at 11:12 AM, Jiong Wang <jiong.w...@foss.arm.com> wrote: > On 31/10/16 19:50, Jason Merrill wrote: >> >> On 10/21/2016 04:30 AM, Jiong Wang wrote: >>> >>> All DW_OP_* of the expression are grouped together inside the PARALLEL, >>> and those operations which don't have RTL mapping are wrapped by >>> UNSPEC. The parsing algorithm is simply something like: >>> >>> foreach elem inside PARALLEL >>> if (UNSPEC) >>> { >>> dw_op_code = INTVAL (XVECEXP (elem, 0, 0)); >>> oprnd1 = INTVAL (XVECEXP (elem, 0, 1)); >>> oprnd2 = INTVAL (XVECEXP (elem, 0, 2)); >>> } >>> else >>> call standard RTL parser. >>> >>> Any comments on the approach? >> >> >> If you're going to use UNSPEC, why not put the DWARF operator in the >> second operand? > > Thanks for the review, but I still don't understand your meaning. > > Do you mean I should simply put the DWARF operator at XVECEXP (UNSPEC_RTX, > 0, 2) instead of at XVECEXP (UNSPEC_RTX, 0, 0)
No, at XINT (UNSPEC_RTX, 1). The documentation of UNSPEC says, /* A machine-specific operation. 1st operand is a vector of operands being used by the operation so that any needed reloads can be done. 2nd operand is a unique value saying which of a number of machine-specific operations is to be performed. Jason