llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.81k stars 11.91k forks source link

M68k backend is not endian-safe #94726

Open awilfox opened 4 months ago

awilfox commented 4 months ago

I'm seeing the following output on a PPC64 (big endian) Power9 workstation when building and testing the latest release, 18.1.7:

********************
********************
Failed Tests (16):
  LLVM :: MC/Disassembler/M68k/arithmetic.txt
  LLVM :: MC/Disassembler/M68k/control.txt
  LLVM :: MC/Disassembler/M68k/data.txt
  LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI.s
  LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s
  LLVM :: MC/M68k/Arith/Classes/MxCMP_BI.s
  LLVM :: MC/M68k/Arith/Classes/MxCMP_MI.s
  LLVM :: MC/M68k/Arith/Classes/MxCMP_RI.s
  LLVM :: MC/M68k/Control/Classes/MxCALL.s
  LLVM :: MC/M68k/Control/branch-pc-rel.s
  LLVM :: MC/M68k/Control/bsr.s
  LLVM :: MC/M68k/Data/Classes/MxMove_MM.s
  LLVM :: MC/M68k/Data/Classes/MxMove_RI.s
  LLVM :: MC/M68k/pc-rel.s
  LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-predictable-output2.test
  LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-string.test

Testing Time: 502.12s

Total Discovered Tests: 58077
  Skipped          :    64 (0.11%)
  Unsupported      :  4026 (6.93%)
  Passed           : 53820 (92.67%)
  Expectedly Failed:   151 (0.26%)
  Failed           :    16 (0.03%)

The first test failure shows the trouble ahead:

******************** TEST 'LLVM :: MC/Disassembler/M68k/arithmetic.txt' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt
+ /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple + m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck/home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt 
/home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt
/home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt:44:10: error: CHECK: expected string not found in input
# CHECK: adda.l #50402580, %a1
         ^
<stdin>:15:26: note: scanning from here
 adda.l (18,%a4,%d1), %a3
                         ^
<stdin>:16:2: note: possible intended match here
 adda.l #353633025, %a1
 ^

Input file: <stdin>
Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            .
            .
            .
           10:  add.w %d2, (20,%a6,%d5) 
           11:  add.w #5205, (49,%a3,%d7) 
           12:  add.w %d2, (%a6) 
           13:  add.w #5378, (%a6) 
           14:  add.w %d2, (5380,%a2) 
           15:  adda.l (18,%a4,%d1), %a3 
check:44'0                              X error: no match found
           16:  adda.l #353633025, %a1 
check:44'0     ~~~~~~~~~~~~~~~~~~~~~~~~
check:44'1      ?                       possible intended match
           17:  adda.l (%a5), %a1 
check:44'0     ~~~~~~~~~~~~~~~~~~~
           18:  adda.l (0,%pc,%sp), %sp 
check:44'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
           19:  adda.l (5401,%pc), %a5 
check:44'0     ~~~~~~~~~~~~~~~~~~~~~~~~
           20:  adda.l %a5, %a4 
check:44'0     ~~~~~~~~~~~~~~~~~
           21:  add.l (4660,%sp), %d5 
check:44'0     ~~~~~~~~~~~~~~~~~~~~~~~
            .
            .
            .
>>>>>>

--

Note that expected number 50402580 is 0x03011514 and actual number 353633025 is 0x15140301. The other 13 M68k-based tests fail in similar ways:

Further test failures

``` ******************** FAIL: LLVM :: MC/Disassembler/M68k/control.txt (32883 of 52998) ******************** TEST 'LLVM :: MC/Disassembler/M68k/control.txt' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt:22:10: error: CHECK: expected string not found in input # CHECK: bsr.l $f0001 ^ :9:12: note: scanning from here bsr.w $f01 ^ :10:2: note: possible intended match here bsr.l $1000f ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: bra $0 3: jsr $0 4: rts 5: seq %d0 6: sgt %d0 7: nop 8: bsr.b $1 9: bsr.w $f01 check:22'0 X error: no match found 10: bsr.l $1000f check:22'0 ~~~~~~~~~~~~~~ check:22'1 ? possible intended match >>>>>> -- ******************** FAIL: LLVM :: MC/Disassembler/M68k/data.txt (32884 of 52998) ******************** TEST 'LLVM :: MC/Disassembler/M68k/data.txt' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt:39:10: error: CHECK: expected string not found in input # CHECK: move.l $f0000000, %a5 ^ :13:26: note: scanning from here move.l (64,%sp,%a0), %d0 ^ :14:2: note: possible intended match here move.l $f000, %a5 ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt -dump-input=help explains the following input dump. Input was: <<<<<< . . . 8: move.w -(%sp), %a1 9: move.w -(%a6), %d7 10: move.w (12576,%a0), %a5 11: move.w (256,%sp), %d1 12: move.l (32,%a0,%d1), %sp 13: move.l (64,%sp,%a0), %d0 check:39'0 X error: no match found 14: move.l $f000, %a5 check:39'0 ~~~~~~~~~~~~~~~~~~~ check:39'1 ? possible intended match 15: move.l $1, %d0 check:39'0 ~~~~~~~~~~~~~~~~ 16: move.l (32768,%pc), %a2 check:39'0 ~~~~~~~~~~~~~~~~~~~~~~~~~ 17: move.l (16384,%pc), %d1 check:39'0 ~~~~~~~~~~~~~~~~~~~~~~~~~ 18: move.l (128,%pc,%a0), %a5 check:39'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 19: move.l (129,%pc,%d2), %d3 check:39'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ . . . >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s (33945 of 52998) ******************** TEST 'LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s:19:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0xd0,0xbc,0x00,0x01,0xff,0xff] ^ :8:20: note: scanning from here add.l #131071, %d0 ; encoding: [0xd0,0xbc,0xff,0xff,0x00,0x01] ^ :9:23: note: possible intended match here add.l #458752, %d7 ; encoding: [0xde,0xbc,0x00,0x00,0x00,0x07] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: add.b #0, %d1 ; encoding: [0xd2,0x3c,0x00,0x00] 4: add.b #-1, %d2 ; encoding: [0xd4,0x3c,0x00,0xff] 5: add.w #0, %d0 ; encoding: [0xd0,0x7c,0x00,0x00] 6: add.w #-1, %d3 ; encoding: [0xd6,0x7c,0xff,0xff] 7: add.l #-1, %d0 ; encoding: [0xd0,0xbc,0xff,0xff,0xff,0xff] 8: add.l #131071, %d0 ; encoding: [0xd0,0xbc,0xff,0xff,0x00,0x01] same:19'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found 9: add.l #458752, %d7 ; encoding: [0xde,0xbc,0x00,0x00,0x00,0x07] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ same:19'1 ? possible intended match 10: adda.l #0, %a0 ; encoding: [0xd1,0xfc,0x00,0x00,0x00,0x00] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI.s (33946 of 52998) ******************** TEST 'LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s:19:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x0a,0x80,0x00,0x01,0xff,0xff] ^ :8:21: note: scanning from here eori.l #131071, %d0 ; encoding: [0x0a,0x80,0xff,0xff,0x00,0x01] ^ :9:24: note: possible intended match here eori.l #458752, %d7 ; encoding: [0x0a,0x87,0x00,0x00,0x00,0x07] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: eori.b #0, %d1 ; encoding: [0x0a,0x01,0x00,0x00] 4: eori.b #-1, %d2 ; encoding: [0x0a,0x02,0x00,0xff] 5: eori.w #0, %d0 ; encoding: [0x0a,0x40,0x00,0x00] 6: eori.w #-1, %d3 ; encoding: [0x0a,0x43,0xff,0xff] 7: eori.l #-1, %d0 ; encoding: [0x0a,0x80,0xff,0xff,0xff,0xff] 8: eori.l #131071, %d0 ; encoding: [0x0a,0x80,0xff,0xff,0x00,0x01] same:19'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found 9: eori.l #458752, %d7 ; encoding: [0x0a,0x87,0x00,0x00,0x00,0x07] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ same:19'1 ? possible intended match >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Arith/Classes/MxCMP_RI.s (33952 of 52998) ******************** TEST 'LLVM :: MC/M68k/Arith/Classes/MxCMP_RI.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s:16:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x0c,0x87,0x00,0x00,0x00,0x0d] ^ :7:17: note: scanning from here cmpi.l #13, %d7 ; encoding: [0x0c,0x87,0x00,0x0d,0x00,0x00] ^ :7:20: note: possible intended match here cmpi.l #13, %d7 ; encoding: [0x0c,0x87,0x00,0x0d,0x00,0x00] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: cmpi.b #0, %d1 ; encoding: [0x0c,0x01,0x00,0x00] 4: cmpi.b #-1, %d0 ; encoding: [0x0c,0x00,0x00,0xff] 5: cmpi.w #0, %d3 ; encoding: [0x0c,0x43,0x00,0x00] 6: cmpi.w #37, %d2 ; encoding: [0x0c,0x42,0x00,0x25] 7: cmpi.l #13, %d7 ; encoding: [0x0c,0x87,0x00,0x0d,0x00,0x00] same:16'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:16'1 ? possible intended match 8: cmpi.l #42, %d1 ; encoding: [0x0c,0x81,0x00,0x2a,0x00,0x00] same:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Arith/Classes/MxCMP_BI.s (33954 of 52998) ******************** TEST 'LLVM :: MC/M68k/Arith/Classes/MxCMP_BI.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s:19:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x0c,0xb9,0x00,0x00,0x00,0x2a,0xff,0xff,0xff,0xff] ^ :8:31: note: scanning from here cmpi.l #42, $ffffffffffffffff ; encoding: [0x0c,0xb9,0x00,0x2a,0x00,0x00,0xff,0xff,0xff,0xff] ^ :8:34: note: possible intended match here cmpi.l #42, $ffffffffffffffff ; encoding: [0x0c,0xb9,0x00,0x2a,0x00,0x00,0xff,0xff,0xff,0xff] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: cmpi.b #0, $ffffffffffffffff ; encoding: [0x0c,0x39,0x00,0x00,0xff,0xff,0xff,0xff] 4: cmpi.b #-1, $0 ; encoding: [0x0c,0x39,0x00,0xff,0x00,0x00,0x00,0x00] 5: cmpi.w #0, $0 ; encoding: [0x0c,0x79,0x00,0x00,0x00,0x00,0x00,0x00] 6: cmpi.w #37, $ffffffffffffffff ; encoding: [0x0c,0x79,0x00,0x25,0xff,0xff,0xff,0xff] 7: cmpi.l #-1, $0 ; encoding: [0x0c,0xb9,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00] 8: cmpi.l #42, $ffffffffffffffff ; encoding: [0x0c,0xb9,0x00,0x2a,0x00,0x00,0xff,0xff,0xff,0xff] same:19'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:19'1 ? possible intended match >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Arith/Classes/MxCMP_MI.s (33956 of 52998) ******************** TEST 'LLVM :: MC/M68k/Arith/Classes/MxCMP_MI.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s:19:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x0c,0xbb,0x00,0x00,0x00,0x2a,0x18,0xff] ^ :8:26: note: scanning from here cmpi.l #42, (-1,%pc,%d1) ; encoding: [0x0c,0xbb,0x00,0x2a,0x00,0x00,0x18,0xff] ^ :8:29: note: possible intended match here cmpi.l #42, (-1,%pc,%d1) ; encoding: [0x0c,0xbb,0x00,0x2a,0x00,0x00,0x18,0xff] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: cmpi.b #0, (-1,%pc,%d1) ; encoding: [0x0c,0x3b,0x00,0x00,0x18,0xff] 4: cmpi.b #-1, (0,%pc,%d0) ; encoding: [0x0c,0x3b,0x00,0xff,0x08,0x00] 5: cmpi.w #0, (-1,%pc,%d3) ; encoding: [0x0c,0x7b,0x00,0x00,0x38,0xff] 6: cmpi.w #37, (-2,%pc,%d2) ; encoding: [0x0c,0x7b,0x00,0x25,0x28,0xfe] 7: cmpi.l #-1, (0,%pc,%d7) ; encoding: [0x0c,0xbb,0xff,0xff,0xff,0xff,0x78,0x00] 8: cmpi.l #42, (-1,%pc,%d1) ; encoding: [0x0c,0xbb,0x00,0x2a,0x00,0x00,0x18,0xff] same:19'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:19'1 ? possible intended match 9: same:19'0 ~ 10: cmpi.b #0, (0,%pc) ; encoding: [0x0c,0x3a,0x00,0x00,0x00,0x00] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 11: cmpi.b #-1, (-1,%pc) ; encoding: [0x0c,0x3a,0x00,0xff,0xff,0xff] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 12: cmpi.w #0, (-1,%pc) ; encoding: [0x0c,0x7a,0x00,0x00,0xff,0xff] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 13: cmpi.w #37, (-2,%pc) ; encoding: [0x0c,0x7a,0x00,0x25,0xff,0xfe] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ . . . >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Control/Classes/MxCALL.s (33969 of 52998) ******************** TEST 'LLVM :: MC/M68k/Control/Classes/MxCALL.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s:21:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x4e,0xb9,0x00,0x00,0x00,0x2a] ^ :10:9: note: scanning from here jsr $2a ; encoding: [0x4e,0xb9,0x00,0x2a,0x00,0x00] ^ :10:12: note: possible intended match here jsr $2a ; encoding: [0x4e,0xb9,0x00,0x2a,0x00,0x00] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s -dump-input=help explains the following input dump. Input was: <<<<<< . . . 5: jsr (42,%pc,%a0) ; encoding: [0x4e,0xbb,0x88,0x2a] 6: 7: jsr (0,%pc) ; encoding: [0x4e,0xba,0x00,0x00] 8: jsr (32767,%pc) ; encoding: [0x4e,0xba,0x7f,0xff] 9: 10: jsr $2a ; encoding: [0x4e,0xb9,0x00,0x2a,0x00,0x00] same:21'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:21'1 ? possible intended match 11: jsr $ffffffffffffffff ; encoding: [0x4e,0xb9,0xff,0xff,0xff,0xff] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 12: same:21'0 ~ 13: jsr (%a0) ; encoding: [0x4e,0x90] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 14: jsr (%a1) ; encoding: [0x4e,0x91] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 15: jsr (%a2) ; encoding: [0x4e,0x92] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Control/branch-pc-rel.s (33973 of 52998) ******************** TEST 'LLVM :: MC/M68k/Control/branch-pc-rel.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s:20:16: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0xd0,0xbc,0x00,0x00,0x00,0x01] ^ :11:15: note: scanning from here add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] ^ :11:18: note: possible intended match here add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s -dump-input=help explains the following input dump. Input was: <<<<<< . . . 6: ; fixup A - offset: 1, value: .LBB0_2-1, kind: FK_PCRel_1 7: .LBB0_1: 8: add.l #0, %d0 ; encoding: [0xd0,0xbc,0x00,0x00,0x00,0x00] 9: rts ; encoding: [0x4e,0x75] 10: .LBB0_2: 11: add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] same:20'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:20'1 ? possible intended match 12: rts ; encoding: [0x4e,0x75] same:20'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Control/bsr.s (33975 of 52998) ******************** TEST 'LLVM :: MC/M68k/Control/bsr.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s:24:16: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0xd0,0xbc,0x00,0x00,0x00,0x01] ^ :13:15: note: scanning from here add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] ^ :13:18: note: possible intended match here add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s -dump-input=help explains the following input dump. Input was: <<<<<< . . . 8: ; fixup A - offset: 2, value: .LBB0_3, kind: FK_PCRel_4 9: .LBB0_1: 10: add.l #0, %d0 ; encoding: [0xd0,0xbc,0x00,0x00,0x00,0x00] 11: rts ; encoding: [0x4e,0x75] 12: .LBB0_2: 13: add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] same:24'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:24'1 ? possible intended match 14: rts ; encoding: [0x4e,0x75] same:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 15: .LBB0_3: same:24'0 ~~~~~~~~~ 16: add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] same:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 17: rts ; encoding: [0x4e,0x75] same:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Data/Classes/MxMove_MM.s (33987 of 52998) ******************** TEST 'LLVM :: MC/M68k/Data/Classes/MxMove_MM.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s:88:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x23,0xf9,0x7f,0xff,0xff,0xff,0x00,0x00,0x00,0x00] ^ :35:22: note: scanning from here move.l $7fffffff, $0 ; encoding: [0x23,0xf9,0xff,0xff,0x7f,0xff,0x00,0x00,0x00,0x00] ^ :35:25: note: possible intended match here move.l $7fffffff, $0 ; encoding: [0x23,0xf9,0xff,0xff,0x7f,0xff,0x00,0x00,0x00,0x00] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s -dump-input=help explains the following input dump. Input was: <<<<<< . . . 30: move.l (%a1), (%a1) ; encoding: [0x22,0x91] 31: move.l (%a1), (%a1) ; encoding: [0x22,0x91] 32: 33: move.b $ffffffffffffffff, $0 ; encoding: [0x13,0xf9,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00] 34: move.l $0, $ffffffffffffffff ; encoding: [0x23,0xf9,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff] 35: move.l $7fffffff, $0 ; encoding: [0x23,0xf9,0xff,0xff,0x7f,0xff,0x00,0x00,0x00,0x00] same:88'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:88'1 ? possible intended match >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/pc-rel.s (33997 of 52998) ******************** TEST 'LLVM :: MC/M68k/pc-rel.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s:5:16: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x0c,0xba,0x00,0x00,0x00,0x57,A,A] ^ :3:27: note: scanning from here cmpi.l #87, (.LBB0_1,%pc) ; encoding: [0x0c,0xba,0x00,0x57,0x00,0x00,A,A] ^ :3:30: note: possible intended match here cmpi.l #87, (.LBB0_1,%pc) ; encoding: [0x0c,0xba,0x00,0x57,0x00,0x00,A,A] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: cmpi.l #87, (.LBB0_1,%pc) ; encoding: [0x0c,0xba,0x00,0x57,0x00,0x00,A,A] same:5'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:5'1 ? possible intended match 4: ; fixup A - offset: 6, value: .LBB0_1, kind: FK_PCRel_2 same:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5: same:5'0 ~ 6: cmpi.l #94, (.LBB0_2,%pc,%a0) ; encoding: [0x0c,0xbb,0x00,0x5e,0x00,0x00,0x88,A] same:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7: ; fixup A - offset: 7, value: .LBB0_2+1, kind: FK_PCRel_1 same:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 8: .LBB0_1: same:5'0 ~~~~~~~~~ . . . >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Data/Classes/MxMove_RI.s (34008 of 52998) ******************** TEST 'LLVM :: MC/M68k/Data/Classes/MxMove_RI.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s:7:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x22,0x7c,0x00,0x00,0x00,0x2a] ^ :4:17: note: scanning from here move.l #42, %a1 ; encoding: [0x22,0x7c,0x00,0x2a,0x00,0x00] ^ :4:20: note: possible intended match here move.l #42, %a1 ; encoding: [0x22,0x7c,0x00,0x2a,0x00,0x00] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: move.b #-1, %d0 ; encoding: [0x10,0x3c,0x00,0xff] 4: move.l #42, %a1 ; encoding: [0x22,0x7c,0x00,0x2a,0x00,0x00] same:7'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:7'1 ? possible intended match 5: move.l #-1, %a1 ; encoding: [0x22,0x7c,0xff,0xff,0xff,0xff] same:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ```

llvmbot commented 4 months ago

@llvm/issue-subscribers-backend-m68k

Author: A. Wilcox (awilfox)

I'm seeing the following output on a PPC64 (big endian) Power9 workstation when building and testing the latest release, 18.1.7: ``` ******************** ******************** Failed Tests (16): LLVM :: MC/Disassembler/M68k/arithmetic.txt LLVM :: MC/Disassembler/M68k/control.txt LLVM :: MC/Disassembler/M68k/data.txt LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI.s LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s LLVM :: MC/M68k/Arith/Classes/MxCMP_BI.s LLVM :: MC/M68k/Arith/Classes/MxCMP_MI.s LLVM :: MC/M68k/Arith/Classes/MxCMP_RI.s LLVM :: MC/M68k/Control/Classes/MxCALL.s LLVM :: MC/M68k/Control/branch-pc-rel.s LLVM :: MC/M68k/Control/bsr.s LLVM :: MC/M68k/Data/Classes/MxMove_MM.s LLVM :: MC/M68k/Data/Classes/MxMove_RI.s LLVM :: MC/M68k/pc-rel.s LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-predictable-output2.test LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-string.test Testing Time: 502.12s Total Discovered Tests: 58077 Skipped : 64 (0.11%) Unsupported : 4026 (6.93%) Passed : 53820 (92.67%) Expectedly Failed: 151 (0.26%) Failed : 16 (0.03%) ``` The first test failure shows the trouble ahead: ``` ******************** TEST 'LLVM :: MC/Disassembler/M68k/arithmetic.txt' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple + m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck/home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt:44:10: error: CHECK: expected string not found in input # CHECK: adda.l #50402580, %a1 ^ <stdin>:15:26: note: scanning from here adda.l (18,%a4,%d1), %a3 ^ <stdin>:16:2: note: possible intended match here adda.l #353633025, %a1 ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/arithmetic.txt -dump-input=help explains the following input dump. Input was: <<<<<< . . . 10: add.w %d2, (20,%a6,%d5) 11: add.w #5205, (49,%a3,%d7) 12: add.w %d2, (%a6) 13: add.w #5378, (%a6) 14: add.w %d2, (5380,%a2) 15: adda.l (18,%a4,%d1), %a3 check:44'0 X error: no match found 16: adda.l #353633025, %a1 check:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~ check:44'1 ? possible intended match 17: adda.l (%a5), %a1 check:44'0 ~~~~~~~~~~~~~~~~~~~ 18: adda.l (0,%pc,%sp), %sp check:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~~ 19: adda.l (5401,%pc), %a5 check:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~ 20: adda.l %a5, %a4 check:44'0 ~~~~~~~~~~~~~~~~~ 21: add.l (4660,%sp), %d5 check:44'0 ~~~~~~~~~~~~~~~~~~~~~~~ . . . >>>>>> -- ``` Note that expected number `50402580` is `0x03011514` and actual number `353633025` is `0x15140301`. The other 13 M68k-based tests fail in similar ways: <details><summary>Further test failures</summary> <p> ``` ******************** FAIL: LLVM :: MC/Disassembler/M68k/control.txt (32883 of 52998) ******************** TEST 'LLVM :: MC/Disassembler/M68k/control.txt' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt:22:10: error: CHECK: expected string not found in input # CHECK: bsr.l $f0001 ^ <stdin>:9:12: note: scanning from here bsr.w $f01 ^ <stdin>:10:2: note: possible intended match here bsr.l $1000f ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/control.txt -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: bra $0 3: jsr $0 4: rts 5: seq %d0 6: sgt %d0 7: nop 8: bsr.b $1 9: bsr.w $f01 check:22'0 X error: no match found 10: bsr.l $1000f check:22'0 ~~~~~~~~~~~~~~ check:22'1 ? possible intended match >>>>>> -- ******************** FAIL: LLVM :: MC/Disassembler/M68k/data.txt (32884 of 52998) ******************** TEST 'LLVM :: MC/Disassembler/M68k/data.txt' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -disassemble -triple m68k /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt:39:10: error: CHECK: expected string not found in input # CHECK: move.l $f0000000, %a5 ^ <stdin>:13:26: note: scanning from here move.l (64,%sp,%a0), %d0 ^ <stdin>:14:2: note: possible intended match here move.l $f000, %a5 ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/Disassembler/M68k/data.txt -dump-input=help explains the following input dump. Input was: <<<<<< . . . 8: move.w -(%sp), %a1 9: move.w -(%a6), %d7 10: move.w (12576,%a0), %a5 11: move.w (256,%sp), %d1 12: move.l (32,%a0,%d1), %sp 13: move.l (64,%sp,%a0), %d0 check:39'0 X error: no match found 14: move.l $f000, %a5 check:39'0 ~~~~~~~~~~~~~~~~~~~ check:39'1 ? possible intended match 15: move.l $1, %d0 check:39'0 ~~~~~~~~~~~~~~~~ 16: move.l (32768,%pc), %a2 check:39'0 ~~~~~~~~~~~~~~~~~~~~~~~~~ 17: move.l (16384,%pc), %d1 check:39'0 ~~~~~~~~~~~~~~~~~~~~~~~~~ 18: move.l (128,%pc,%a0), %a5 check:39'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 19: move.l (129,%pc,%d2), %d3 check:39'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ . . . >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s (33945 of 52998) ******************** TEST 'LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s:19:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0xd0,0xbc,0x00,0x01,0xff,0xff] ^ <stdin>:8:20: note: scanning from here add.l #131071, %d0 ; encoding: [0xd0,0xbc,0xff,0xff,0x00,0x01] ^ <stdin>:9:23: note: possible intended match here add.l #458752, %d7 ; encoding: [0xde,0xbc,0x00,0x00,0x00,0x07] ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI_xEA.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: add.b #0, %d1 ; encoding: [0xd2,0x3c,0x00,0x00] 4: add.b #-1, %d2 ; encoding: [0xd4,0x3c,0x00,0xff] 5: add.w #0, %d0 ; encoding: [0xd0,0x7c,0x00,0x00] 6: add.w #-1, %d3 ; encoding: [0xd6,0x7c,0xff,0xff] 7: add.l #-1, %d0 ; encoding: [0xd0,0xbc,0xff,0xff,0xff,0xff] 8: add.l #131071, %d0 ; encoding: [0xd0,0xbc,0xff,0xff,0x00,0x01] same:19'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found 9: add.l #458752, %d7 ; encoding: [0xde,0xbc,0x00,0x00,0x00,0x07] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ same:19'1 ? possible intended match 10: adda.l #0, %a0 ; encoding: [0xd1,0xfc,0x00,0x00,0x00,0x00] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI.s (33946 of 52998) ******************** TEST 'LLVM :: MC/M68k/Arith/Classes/MxBiArOp_RFRI.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s:19:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x0a,0x80,0x00,0x01,0xff,0xff] ^ <stdin>:8:21: note: scanning from here eori.l #131071, %d0 ; encoding: [0x0a,0x80,0xff,0xff,0x00,0x01] ^ <stdin>:9:24: note: possible intended match here eori.l #458752, %d7 ; encoding: [0x0a,0x87,0x00,0x00,0x00,0x07] ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxBiArOp_RFRI.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: eori.b #0, %d1 ; encoding: [0x0a,0x01,0x00,0x00] 4: eori.b #-1, %d2 ; encoding: [0x0a,0x02,0x00,0xff] 5: eori.w #0, %d0 ; encoding: [0x0a,0x40,0x00,0x00] 6: eori.w #-1, %d3 ; encoding: [0x0a,0x43,0xff,0xff] 7: eori.l #-1, %d0 ; encoding: [0x0a,0x80,0xff,0xff,0xff,0xff] 8: eori.l #131071, %d0 ; encoding: [0x0a,0x80,0xff,0xff,0x00,0x01] same:19'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found 9: eori.l #458752, %d7 ; encoding: [0x0a,0x87,0x00,0x00,0x00,0x07] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ same:19'1 ? possible intended match >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Arith/Classes/MxCMP_RI.s (33952 of 52998) ******************** TEST 'LLVM :: MC/M68k/Arith/Classes/MxCMP_RI.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s:16:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x0c,0x87,0x00,0x00,0x00,0x0d] ^ <stdin>:7:17: note: scanning from here cmpi.l #13, %d7 ; encoding: [0x0c,0x87,0x00,0x0d,0x00,0x00] ^ <stdin>:7:20: note: possible intended match here cmpi.l #13, %d7 ; encoding: [0x0c,0x87,0x00,0x0d,0x00,0x00] ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_RI.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: cmpi.b #0, %d1 ; encoding: [0x0c,0x01,0x00,0x00] 4: cmpi.b #-1, %d0 ; encoding: [0x0c,0x00,0x00,0xff] 5: cmpi.w #0, %d3 ; encoding: [0x0c,0x43,0x00,0x00] 6: cmpi.w #37, %d2 ; encoding: [0x0c,0x42,0x00,0x25] 7: cmpi.l #13, %d7 ; encoding: [0x0c,0x87,0x00,0x0d,0x00,0x00] same:16'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:16'1 ? possible intended match 8: cmpi.l #42, %d1 ; encoding: [0x0c,0x81,0x00,0x2a,0x00,0x00] same:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Arith/Classes/MxCMP_BI.s (33954 of 52998) ******************** TEST 'LLVM :: MC/M68k/Arith/Classes/MxCMP_BI.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s:19:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x0c,0xb9,0x00,0x00,0x00,0x2a,0xff,0xff,0xff,0xff] ^ <stdin>:8:31: note: scanning from here cmpi.l #42, $ffffffffffffffff ; encoding: [0x0c,0xb9,0x00,0x2a,0x00,0x00,0xff,0xff,0xff,0xff] ^ <stdin>:8:34: note: possible intended match here cmpi.l #42, $ffffffffffffffff ; encoding: [0x0c,0xb9,0x00,0x2a,0x00,0x00,0xff,0xff,0xff,0xff] ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_BI.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: cmpi.b #0, $ffffffffffffffff ; encoding: [0x0c,0x39,0x00,0x00,0xff,0xff,0xff,0xff] 4: cmpi.b #-1, $0 ; encoding: [0x0c,0x39,0x00,0xff,0x00,0x00,0x00,0x00] 5: cmpi.w #0, $0 ; encoding: [0x0c,0x79,0x00,0x00,0x00,0x00,0x00,0x00] 6: cmpi.w #37, $ffffffffffffffff ; encoding: [0x0c,0x79,0x00,0x25,0xff,0xff,0xff,0xff] 7: cmpi.l #-1, $0 ; encoding: [0x0c,0xb9,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00] 8: cmpi.l #42, $ffffffffffffffff ; encoding: [0x0c,0xb9,0x00,0x2a,0x00,0x00,0xff,0xff,0xff,0xff] same:19'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:19'1 ? possible intended match >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Arith/Classes/MxCMP_MI.s (33956 of 52998) ******************** TEST 'LLVM :: MC/M68k/Arith/Classes/MxCMP_MI.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s:19:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x0c,0xbb,0x00,0x00,0x00,0x2a,0x18,0xff] ^ <stdin>:8:26: note: scanning from here cmpi.l #42, (-1,%pc,%d1) ; encoding: [0x0c,0xbb,0x00,0x2a,0x00,0x00,0x18,0xff] ^ <stdin>:8:29: note: possible intended match here cmpi.l #42, (-1,%pc,%d1) ; encoding: [0x0c,0xbb,0x00,0x2a,0x00,0x00,0x18,0xff] ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Arith/Classes/MxCMP_MI.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: cmpi.b #0, (-1,%pc,%d1) ; encoding: [0x0c,0x3b,0x00,0x00,0x18,0xff] 4: cmpi.b #-1, (0,%pc,%d0) ; encoding: [0x0c,0x3b,0x00,0xff,0x08,0x00] 5: cmpi.w #0, (-1,%pc,%d3) ; encoding: [0x0c,0x7b,0x00,0x00,0x38,0xff] 6: cmpi.w #37, (-2,%pc,%d2) ; encoding: [0x0c,0x7b,0x00,0x25,0x28,0xfe] 7: cmpi.l #-1, (0,%pc,%d7) ; encoding: [0x0c,0xbb,0xff,0xff,0xff,0xff,0x78,0x00] 8: cmpi.l #42, (-1,%pc,%d1) ; encoding: [0x0c,0xbb,0x00,0x2a,0x00,0x00,0x18,0xff] same:19'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:19'1 ? possible intended match 9: same:19'0 ~ 10: cmpi.b #0, (0,%pc) ; encoding: [0x0c,0x3a,0x00,0x00,0x00,0x00] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 11: cmpi.b #-1, (-1,%pc) ; encoding: [0x0c,0x3a,0x00,0xff,0xff,0xff] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 12: cmpi.w #0, (-1,%pc) ; encoding: [0x0c,0x7a,0x00,0x00,0xff,0xff] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 13: cmpi.w #37, (-2,%pc) ; encoding: [0x0c,0x7a,0x00,0x25,0xff,0xfe] same:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ . . . >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Control/Classes/MxCALL.s (33969 of 52998) ******************** TEST 'LLVM :: MC/M68k/Control/Classes/MxCALL.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s:21:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x4e,0xb9,0x00,0x00,0x00,0x2a] ^ <stdin>:10:9: note: scanning from here jsr $2a ; encoding: [0x4e,0xb9,0x00,0x2a,0x00,0x00] ^ <stdin>:10:12: note: possible intended match here jsr $2a ; encoding: [0x4e,0xb9,0x00,0x2a,0x00,0x00] ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s -dump-input=help explains the following input dump. Input was: <<<<<< . . . 5: jsr (42,%pc,%a0) ; encoding: [0x4e,0xbb,0x88,0x2a] 6: 7: jsr (0,%pc) ; encoding: [0x4e,0xba,0x00,0x00] 8: jsr (32767,%pc) ; encoding: [0x4e,0xba,0x7f,0xff] 9: 10: jsr $2a ; encoding: [0x4e,0xb9,0x00,0x2a,0x00,0x00] same:21'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:21'1 ? possible intended match 11: jsr $ffffffffffffffff ; encoding: [0x4e,0xb9,0xff,0xff,0xff,0xff] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 12: same:21'0 ~ 13: jsr (%a0) ; encoding: [0x4e,0x90] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 14: jsr (%a1) ; encoding: [0x4e,0x91] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 15: jsr (%a2) ; encoding: [0x4e,0x92] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Control/branch-pc-rel.s (33973 of 52998) ******************** TEST 'LLVM :: MC/M68k/Control/branch-pc-rel.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s:20:16: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0xd0,0xbc,0x00,0x00,0x00,0x01] ^ <stdin>:11:15: note: scanning from here add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] ^ <stdin>:11:18: note: possible intended match here add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/branch-pc-rel.s -dump-input=help explains the following input dump. Input was: <<<<<< . . . 6: ; fixup A - offset: 1, value: .LBB0_2-1, kind: FK_PCRel_1 7: .LBB0_1: 8: add.l #0, %d0 ; encoding: [0xd0,0xbc,0x00,0x00,0x00,0x00] 9: rts ; encoding: [0x4e,0x75] 10: .LBB0_2: 11: add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] same:20'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:20'1 ? possible intended match 12: rts ; encoding: [0x4e,0x75] same:20'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Control/bsr.s (33975 of 52998) ******************** TEST 'LLVM :: MC/M68k/Control/bsr.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s:24:16: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0xd0,0xbc,0x00,0x00,0x00,0x01] ^ <stdin>:13:15: note: scanning from here add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] ^ <stdin>:13:18: note: possible intended match here add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Control/bsr.s -dump-input=help explains the following input dump. Input was: <<<<<< . . . 8: ; fixup A - offset: 2, value: .LBB0_3, kind: FK_PCRel_4 9: .LBB0_1: 10: add.l #0, %d0 ; encoding: [0xd0,0xbc,0x00,0x00,0x00,0x00] 11: rts ; encoding: [0x4e,0x75] 12: .LBB0_2: 13: add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] same:24'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:24'1 ? possible intended match 14: rts ; encoding: [0x4e,0x75] same:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 15: .LBB0_3: same:24'0 ~~~~~~~~~ 16: add.l #1, %d0 ; encoding: [0xd0,0xbc,0x00,0x01,0x00,0x00] same:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 17: rts ; encoding: [0x4e,0x75] same:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Data/Classes/MxMove_MM.s (33987 of 52998) ******************** TEST 'LLVM :: MC/M68k/Data/Classes/MxMove_MM.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s:88:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x23,0xf9,0x7f,0xff,0xff,0xff,0x00,0x00,0x00,0x00] ^ <stdin>:35:22: note: scanning from here move.l $7fffffff, $0 ; encoding: [0x23,0xf9,0xff,0xff,0x7f,0xff,0x00,0x00,0x00,0x00] ^ <stdin>:35:25: note: possible intended match here move.l $7fffffff, $0 ; encoding: [0x23,0xf9,0xff,0xff,0x7f,0xff,0x00,0x00,0x00,0x00] ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s -dump-input=help explains the following input dump. Input was: <<<<<< . . . 30: move.l (%a1), (%a1) ; encoding: [0x22,0x91] 31: move.l (%a1), (%a1) ; encoding: [0x22,0x91] 32: 33: move.b $ffffffffffffffff, $0 ; encoding: [0x13,0xf9,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00] 34: move.l $0, $ffffffffffffffff ; encoding: [0x23,0xf9,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff] 35: move.l $7fffffff, $0 ; encoding: [0x23,0xf9,0xff,0xff,0x7f,0xff,0x00,0x00,0x00,0x00] same:88'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:88'1 ? possible intended match >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/pc-rel.s (33997 of 52998) ******************** TEST 'LLVM :: MC/M68k/pc-rel.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s:5:16: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x0c,0xba,0x00,0x00,0x00,0x57,A,A] ^ <stdin>:3:27: note: scanning from here cmpi.l #87, (.LBB0_1,%pc) ; encoding: [0x0c,0xba,0x00,0x57,0x00,0x00,A,A] ^ <stdin>:3:30: note: possible intended match here cmpi.l #87, (.LBB0_1,%pc) ; encoding: [0x0c,0xba,0x00,0x57,0x00,0x00,A,A] ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/pc-rel.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: cmpi.l #87, (.LBB0_1,%pc) ; encoding: [0x0c,0xba,0x00,0x57,0x00,0x00,A,A] same:5'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:5'1 ? possible intended match 4: ; fixup A - offset: 6, value: .LBB0_1, kind: FK_PCRel_2 same:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5: same:5'0 ~ 6: cmpi.l #94, (.LBB0_2,%pc,%a0) ; encoding: [0x0c,0xbb,0x00,0x5e,0x00,0x00,0x88,A] same:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7: ; fixup A - offset: 7, value: .LBB0_2+1, kind: FK_PCRel_1 same:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 8: .LBB0_1: same:5'0 ~~~~~~~~~ . . . >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Data/Classes/MxMove_RI.s (34008 of 52998) ******************** TEST 'LLVM :: MC/M68k/Data/Classes/MxMove_RI.s' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/llvm-mc -triple=m68k -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s + /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s:7:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x22,0x7c,0x00,0x00,0x00,0x2a] ^ <stdin>:4:17: note: scanning from here move.l #42, %a1 ; encoding: [0x22,0x7c,0x00,0x2a,0x00,0x00] ^ <stdin>:4:20: note: possible intended match here move.l #42, %a1 ; encoding: [0x22,0x7c,0x00,0x2a,0x00,0x00] ^ Input file: <stdin> Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm18/src/llvm-project-18.1.7.src/llvm/test/MC/M68k/Data/Classes/MxMove_RI.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: .text 2: 3: move.b #-1, %d0 ; encoding: [0x10,0x3c,0x00,0xff] 4: move.l #42, %a1 ; encoding: [0x22,0x7c,0x00,0x2a,0x00,0x00] same:7'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:7'1 ? possible intended match 5: move.l #-1, %a1 ; encoding: [0x22,0x7c,0xff,0xff,0xff,0xff] same:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ``` </p> </details>
awilfox commented 4 months ago

All of the noted tests fail back to 16.0.0, except MC/M68k/Control/bsr.s. The 15 branch only has two of these failures, with the rest still working. 14.0.6 passes all M68k tests.

15.0.0 results:

  LLVM :: MC/M68k/Control/Classes/MxCALL.s
  LLVM :: MC/M68k/Data/Classes/MxMove_MM.s
Details ``` ******************** FAIL: LLVM :: MC/M68k/Control/Classes/MxCALL.s (28354 of 44588) ******************** TEST 'LLVM :: MC/M68k/Control/Classes/MxCALL.s' FAILED ******************** Script: -- : 'RUN: at line 1'; /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s -- Exit Code: 1 Command Output (stderr): -- /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s:21:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x4e,0xb9,0x00,0x00,0x00,0x2a] ^ :10:9: note: scanning from here jsr $2a ; encoding: [0x4e,0xb9,0x00,0x2a,0x00,0x00] ^ :10:12: note: possible intended match here jsr $2a ; encoding: [0x4e,0xb9,0x00,0x2a,0x00,0x00] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/test/MC/M68k/Control/Classes/MxCALL.s -dump-input=help explains the following input dump. Input was: <<<<<< . . . 5: jsr (42,%pc,%a0) ; encoding: [0x4e,0xbb,0x88,0x2a] 6: 7: jsr (0,%pc) ; encoding: [0x4e,0xba,0x00,0x00] 8: jsr (32767,%pc) ; encoding: [0x4e,0xba,0x7f,0xff] 9: 10: jsr $2a ; encoding: [0x4e,0xb9,0x00,0x2a,0x00,0x00] same:21'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:21'1 ? possible intended match 11: jsr $ffffffffffffffff ; encoding: [0x4e,0xb9,0xff,0xff,0xff,0xff] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 12: same:21'0 ~ 13: jsr (%a0) ; encoding: [0x4e,0x90] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 14: jsr (%a1) ; encoding: [0x4e,0x91] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 15: jsr (%a2) ; encoding: [0x4e,0x92] same:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ******************** FAIL: LLVM :: MC/M68k/Data/Classes/MxMove_MM.s (28375 of 44588) ******************** TEST 'LLVM :: MC/M68k/Data/Classes/MxMove_MM.s' FAILED ******************** Script: -- : 'RUN: at line 1'; /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/build/bin/llvm-mc -triple=m68k -motorola-integers -show-encoding /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s | /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/build/bin/FileCheck /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s -- Exit Code: 1 Command Output (stderr): -- /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s:88:15: error: CHECK-SAME: expected string not found in input ; CHECK-SAME: encoding: [0x23,0xf9,0x7f,0xff,0xff,0xff,0x00,0x00,0x00,0x00] ^ :35:22: note: scanning from here move.l $7fffffff, $0 ; encoding: [0x23,0xf9,0xff,0xff,0x7f,0xff,0x00,0x00,0x00,0x00] ^ :35:25: note: possible intended match here move.l $7fffffff, $0 ; encoding: [0x23,0xf9,0xff,0xff,0x7f,0xff,0x00,0x00,0x00,0x00] ^ Input file: Check file: /home/awilcox/Code/awilfox/gcc-next/user/llvm15/src/llvm-project-15.0.0.src/llvm/test/MC/M68k/Data/Classes/MxMove_MM.s -dump-input=help explains the following input dump. Input was: <<<<<< . . . 30: move.l (%a1), (%a1) ; encoding: [0x22,0x91] 31: move.l (%a1), (%a1) ; encoding: [0x22,0x91] 32: 33: move.b $ffffffffffffffff, $0 ; encoding: [0x13,0xf9,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00] 34: move.l $0, $ffffffffffffffff ; encoding: [0x23,0xf9,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff] 35: move.l $7fffffff, $0 ; encoding: [0x23,0xf9,0xff,0xff,0x7f,0xff,0x00,0x00,0x00,0x00] same:88'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found same:88'1 ? possible intended match >>>>>> ```
awilfox commented 4 months ago
b3de316420374536def0cc3bfb7d317db9fc830c is the first bad commit
commit b3de316420374536def0cc3bfb7d317db9fc830c
Author: Min-Yih Hsu <minyihh@uci.edu>
Date:   Mon Oct 10 22:07:48 2022 -0700

    [M68k][MC] Make immediate operands relocatable

    Sometimes memory addresses are treated as immediate values. Thus
    immediate operands have to be relocatable.

    Differential Revision: https://reviews.llvm.org/D137902

 llvm/lib/Target/M68k/M68kInstrFormats.td | 11 +++++++----
 llvm/test/MC/M68k/Relocations/data-abs.s | 17 +++++++++++++++++
 2 files changed, 24 insertions(+), 4 deletions(-)
bisect found first bad commit

If llvm/llvm-project@b3de316420374536def0cc3bfb7d317db9fc830c is the first bad commit, I'm thinking DecodeImm32 is the buggy function on BE. I will dig further and see if I can reduce this further.

RKSimon commented 4 months ago

DecodeImm32 just wraps llvm.M68k.swapWord - so you should probably look in there:

https://github.com/llvm/llvm-project/blob/e5a41f0afc152cc24b8fef3aa177ef53b2e77c43/llvm/lib/Target/M68k/MCTargetDesc/M68kBaseInfo.h#L77-L94

@mshockwave any thoughts?

awilfox commented 4 months ago

It feels like something is unconditionally byte-swapping regardless of the fact I'm on BE which is causing this corruption. Stubbing out swapWord (changing it to just return Val;) doesn't cause any change - as it shouldn't, since the comment (and the code) say it does nothing on a BE host.

awilfox commented 4 months ago

The problem does not seem to be in DecodeImm32. The commit also changed the test files to be "correct", which is actually what caused the tests to start failing here. It seems to reason then that the M68k backend was always wrong on BE, it's just that the test suite wasn't checking it properly until this commit.

Also I can confirm that it appears to be decoding things properly, which implies the encoding is what is actually incorrect.

awilfox commented 4 months ago

I believe that some of these are actually the tests being wrong. For instance:

# CHECK: adda.l  #50402580, %a1
0xd3 0xfc 0x03 0x01 0x15 0x14

This test looks incorrect to me. 50402580 gives value 0x0301'1514, but the LLVM source even explicitly states:

https://github.com/llvm/llvm-project/blob/e5a41f0afc152cc24b8fef3aa177ef53b2e77c43/llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp#L103-L110

But now I am concerned: do these tests pass on little endian hosts? In that case, it's possible that swapWord isn't working correctly. I will test now on an Arm64 (Apple M1) system and check.

awilfox commented 4 months ago

Yes, the tests pass on Arm64. Which means either I am correct, and the values are correct on BE hosts but not being swapped properly on LE hosts, or the original report was correct, and the values are correct on LE hosts but not being swapped properly on BE hosts. I'll try and do some further analysis with GNU binutils to see what they do with these inputs.

awilfox commented 4 months ago

Having twiddled the bits manually through various disassemblers, yes, the tests are correct. Something is not working correctly on BE hosts. Sorry if this is a bit noisy, by the way. This is my first time dealing with M68k opcodes in raw byte format, and the descriptions are sometimes a bit unclear to me.

awilfox commented 4 months ago

It seems to be that the problem is that encodeInstruction is indeed unconditionally swapping 16-bit words. If we change swapWord to unconditionally swap too, i.e. change MCTargetInfo/M68kBaseInfo.h in this manner:

@@ -85,9 +85,10 @@ template <typename value_t> value_t swapWord(value_t Val) {
   Val = support::endian::byte_swap(Val, llvm::endianness::big);
   value_t NewVal = 0;
   for (unsigned i = 0U; i != NumWords; ++i) {
-    uint16_t Part = (Val >> (i * 16)) & 0xFFFF;
-    Part = support::endian::byte_swap(Part, llvm::endianness::big);
-    NewVal |= (Part << (i * 16));
+    uint16_t Lo = (Val >> (i * 16)) & 0xFFFF;
+    NewVal |= (Lo << (++i * 16));
+    uint16_t Hi = (Val >> (i * 16)) & 0xFFFF;
+    NewVal |= (Hi << ((i - 1) * 16));
   }
   return NewVal;
 }

Then the tests pass on my PPC64 (BE) host, but of course then start failing on Arm64 (LE).