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: [nvptx] Re: Mostly rewrite genrecog

On Thu, May 07, 2015 at 10:59:01AM +0200, Thomas Schwinge wrote:
>      build/genrecog [...]/source-gcc/gcc/ [...]/source-gcc/gcc/config/nvptx/ \
>       > tmp-recog.c
>     -[...]/source-gcc/gcc/config/nvptx/ warning: operand 0 missing mode?
>     -[...]/source-gcc/gcc/config/nvptx/ warning: operand 1 missing mode?
> gcc/config/nvptx/
>     1206 (define_insn "allocate_stack"
>     1207   [(set (match_operand 0 "nvptx_register_operand" "=R")
>     1208         (unspec [(match_operand 1 "nvptx_register_operand" "R")]
>     1209                   UNSPEC_ALLOCA))]
>     1210   ""
>     1211   "%.\\tcall (%0), %%alloca, (%1);")
> Are these two (former) warnings a) something that should still be
> reported by genrecog, 


> and b) something that should be addressed (Bernd)?

Yes.  Supposedly you want :P on both match_operand and unspec too, but
as this serves not just as an insn pattern, but also as expander that
needs to have this particular name, supposedly you want:

(define_expand "allocate_stack"
  [(match_operand 0 "nvptx_register_operand")
   (match_operand 1 "nvptx_register_operand")]
  if (TARGET_ABI64)
    emit_insn (gen_allocate_stack_di (operands[0], operands[1]));
    emit_insn (gen_allocate_stack_si (operands[0], operands[1]));

(define_insn "allocate_stack_<mode>"
  [(set (match_operand:P 0 "nvptx_register_operand" "=R")
	(unspec:P [(match_operand:P 1 "nvptx_register_operand" "R")]
  "%.\\tcall (%0), %%alloca, (%1);")

rr so.  Of course, as even latest Cuda drop doesn't support alloca, this is
quite dubious, perhaps better would be sorry on it.

BTW, with Cuda 7.0, even printf doesn't work anymore, is that known?


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