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

            Bug ID: 108790
           Summary: bpf: gcc emits malformed ldxdw instruction at -O2
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: david.faust at oracle dot com
                CC: cupertino.miranda at oracle dot com
  Target Milestone: ---
            Target: bpf

With -O2 GCC emits a malformed ldxdw instruction in some cases:

$ cat ldxdw.c
unsigned long long test () {
  return *((unsigned long long *) 0x4000);
}

$ bpf-unknown-none-gcc -c -O2 ldxdw.c -o ldxdw.o
/tmp/ccsuVj7l.s: Assembler messages:
/tmp/ccsuVj7l.s:7: Error: unrecognized form of instruction `ldxdw %r0,16384'

ldxdw (and all other {ldx,stx}{b,h,w,dw} insns should have a form like

    ldxdw %rX, [%rY + OFFSET]

Looks like we need a better constraint on the memory operand in *mov<MM:mode>.

Testing a patch for this now.
  • [Bug target/108790] New: bpf: g... david.faust at oracle dot com via Gcc-bugs

Reply via email to