On Mon, Jun 17, 2019 at 04:53:24PM +0200, Tom de Vries wrote: > Updated accordingly, and committed as attached.
Note, current trunk allows one to define expanders that take mode as the first argument, so you could (define_insn "@set_softstack_<mode>" [(unspec [(match_operand:P 0 "nvptx_register_operand" "R")] UNSPEC_SET_SOFTSTACK)] "TARGET_SOFT_STACK" ... and then just use gen_set_softstack (Pmode, arg). Jakub