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

            Bug ID: 111029
           Summary: bpf: GCC generates invalid  instructions wN = (s8) rM
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jemarch at gcc dot gnu.org
  Target Milestone: ---

Created attachment 55738
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55738&action=edit
preprocessed source of kernel bpf selftest

When compiling the attached pre-processed program (which is a kernel bpf
selftest) with gcc-bpf we get invalid pseudo-c movs32 instructions:

$ bpf-unknown-none-gcc  -g -Wall -Werror -D__TARGET_ARCH_x86 -mlittle-endian
-O2 -gbtf -masm=pseudoc -mco-re -Wno-unknown-pragmas -Wno-unused-variable
-Wno-error=attributes -Wno-error=address-of-packed-member -c test_sysctl_prog.i
/tmp/ccgPxp1s.s: Assembler messages:
/tmp/ccgPxp1s.s:63: Error: unrecognized instruction `w2 =(s8)r1'
/tmp/ccgPxp1s.s:63: Error: expected register name, got 'r1'
/tmp/ccgPxp1s.s:71: Error: unrecognized instruction `w4 =(s8)r3'
/tmp/ccgPxp1s.s:71: Error: expected register name, got 'r3'
/tmp/ccgPxp1s.s:79: Error: unrecognized instruction `w9 =(s8)r5'
/tmp/ccgPxp1s.s:79: Error: expected register name, got 'r5'
/tmp/ccgPxp1s.s:88: Error: unrecognized instruction `w1 =(s8)r0'
/tmp/ccgPxp1s.s:88: Error: expected register name, got 'r0'
/tmp/ccgPxp1s.s:96: Error: unrecognized instruction `w3 =(s8)r2'
/tmp/ccgPxp1s.s:96: Error: expected register name, got 'r2'
/tmp/ccgPxp1s.s:104: Error: unrecognized instruction `w5 =(s8)r4'
/tmp/ccgPxp1s.s:104: Error: expected register name, got 'r4'
/tmp/ccgPxp1s.s:112: Error: unrecognized instruction `w0 =(s8)r9'
/tmp/ccgPxp1s.s:112: Error: expected register name, got 'r9'
/tmp/ccgPxp1s.s:120: Error: unrecognized instruction `w2 =(s8)r1'
/tmp/ccgPxp1s.s:120: Error: expected register name, got 'r1'
/tmp/ccgPxp1s.s:128: Error: unrecognized instruction `w4 =(s8)r3'
/tmp/ccgPxp1s.s:128: Error: expected register name, got 'r3'
/tmp/ccgPxp1s.s:136: Error: unrecognized instruction `w9 =(s8)r5'
/tmp/ccgPxp1s.s:136: Error: expected register name, got 'r5'
/tmp/ccgPxp1s.s:144: Error: unrecognized instruction `w1 =(s8)r0'
/tmp/ccgPxp1s.s:144: Error: expected register name, got 'r0'
/tmp/ccgPxp1s.s:152: Error: unrecognized instruction `w3 =(s8)r2'
/tmp/ccgPxp1s.s:152: Error: expected register name, got 'r2'
/tmp/ccgPxp1s.s:160: Error: unrecognized instruction `w5 =(s8)r4'
/tmp/ccgPxp1s.s:160: Error: expected register name, got 'r4'
/tmp/ccgPxp1s.s:168: Error: unrecognized instruction `w0 =(s8)r9'
/tmp/ccgPxp1s.s:168: Error: expected register name, got 'r9'
/tmp/ccgPxp1s.s:176: Error: unrecognized instruction `w2 =(s8)r1'
/tmp/ccgPxp1s.s:176: Error: expected register name, got 'r1'
/tmp/ccgPxp1s.s:184: Error: unrecognized instruction `w4 =(s8)r3'
/tmp/ccgPxp1s.s:184: Error: expected register name, got 'r3'
/tmp/ccgPxp1s.s:192: Error: unrecognized instruction `w9 =(s8)r5'
/tmp/ccgPxp1s.s:192: Error: expected register name, got 'r5'

Reply via email to