public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/108790] New: bpf: gcc emits malformed ldxdw instruction at -O2
@ 2023-02-14 18:52 david.faust at oracle dot com
  2023-02-14 22:47 ` [Bug target/108790] " cvs-commit at gcc dot gnu.org
  2023-08-17 17:18 ` jemarch at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: david.faust at oracle dot com @ 2023-02-14 18:52 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-17 17:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 18:52 [Bug target/108790] New: bpf: gcc emits malformed ldxdw instruction at -O2 david.faust at oracle dot com
2023-02-14 22:47 ` [Bug target/108790] " cvs-commit at gcc dot gnu.org
2023-08-17 17:18 ` jemarch at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).