This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug target/81662] New: fpatchable-function-entry requires nop, which nvptx does not have


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81662

            Bug ID: 81662
           Summary: fpatchable-function-entry requires nop, which nvptx
                    does not have
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

nop is a standard name that needs to be defined (
https://gcc.gnu.org/onlinedocs/gccint/Standard-Names.html#index-nop-instruction-pattern
):
...
‘nop’

    No-op instruction. This instruction pattern name should always be defined
to output a no-op in assembler code. (const_int 0) will do as an RTL pattern. 
...

And nops are used for fpatchable-function-entry:
....
void
default_print_patchable_function_entry (FILE *file,
                                        unsigned HOST_WIDE_INT patch_area_size,
                                        bool record_p)
{
  const char *nop_templ = 0;
  int code_num;
  rtx_insn *my_nop = make_insn_raw (gen_nop ());
...

The nvptx target defines nop, but the output string is empty, because nvptx
does not support nops:
...
(define_insn "nop"
  [(const_int 0)]
  ""
  "")
...

So for nvptx, we run into these failures:
...
FAIL: c-c++-common/patchable_function_entry-decl.c  -Wc++-compat  
scan-assembler-times nop 2
FAIL: c-c++-common/patchable_function_entry-default.c  -Wc++-compat  
scan-assembler-times nop 3
FAIL: c-c++-common/patchable_function_entry-definition.c  -Wc++-compat  
scan-assembler-times nop 1
...

We should:
- skips these test-cases for nvptx
- error out for nvptx is the flag is used
- add an nvptx test-case that checks that.

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