Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SystemZ] Add missing (dis-)assembly tests. #88498

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions llvm/test/MC/Disassembler/SystemZ/insns-z14.txt
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,12 @@
# CHECK: msgrkc %r7, %r8, %r9
0xb9 0xed 0x90 0x78

# CHECK: ppno %r0, %r2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already tested in insns-z13.txt, why add it again in insns-z14?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I overlooked that they were already there, will remove these.

0xb9 0x3c 0x00 0x02

# CHECK: ppno %r12, %r14
0xb9 0x3c 0x00 0xce

# CHECK: sgh %r0, -524288
0xe3 0x00 0x00 0x00 0x80 0x39

Expand Down Expand Up @@ -989,6 +995,9 @@
# CHECK: vflcsb %v14, %v17
0xe7 0xe1 0x00 0x00 0x24 0xcc

# CHECK: vflls %v0, %v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be mentioned in the commit message as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, shouldn't we then also test the wffls variant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this is covered by vldeb and should be deleted.

0xe7 0x01 0x00 0x00 0x20 0xc4

# CHECK: vflnsb %v0, %v0
0xe7 0x00 0x00 0x10 0x20 0xcc

Expand Down
108 changes: 96 additions & 12 deletions llvm/test/MC/Disassembler/SystemZ/insns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2956,6 +2956,12 @@
# CHECK: cgib %r0, 0, 15, 0
0xec 0x0f 0x00 0x00 0x00 0xfc

# CHECK: cgit %r0, 0, 0
0xec 0x00 0x00 0x00 0x00 0x70

# CHECK: cgit %r0, 0, 15
0xec 0x00 0x00 0x00 0xf0 0x70

# CHECK: cgith %r0, 0
0xec 0x00 0x00 0x00 0x20 0x70

Expand Down Expand Up @@ -3052,6 +3058,12 @@
# CHECK: cgrb %r0, %r0, 15, 0
0xec 0x00 0x00 0x00 0xf0 0xe4

# CHECK: cgrt %r0, %r1, 0
0xb9 0x60 0x00 0x01

# CHECK: cgrt %r0, %r1, 15
0xb9 0x60 0xf0 0x01

# CHECK: cgrth %r0, %r1
0xb9 0x60 0x20 0x01

Expand Down Expand Up @@ -3430,6 +3442,12 @@
# CHECK: cih %r15, 0
0xcc 0xfd 0x00 0x00 0x00 0x00

# CHECK: cit %r0, 0, 0
0xec 0x00 0x00 0x00 0x00 0x72

# CHECK: cit %r0, 0, 15
0xec 0x00 0x00 0x00 0xf0 0x72

# CHECK: cith %r0, 0
0xec 0x00 0x00 0x00 0x20 0x72

Expand Down Expand Up @@ -3862,6 +3880,12 @@
# CHECK: clfi %r15, 0
0xc2 0xff 0x00 0x00 0x00 0x00

# CHECK: clfit %r0, 0, 0
0xec 0x00 0x00 0x00 0x00 0x73

# CHECK: clfit %r0, 0, 15
0xec 0x00 0x00 0x00 0xf0 0x73

# CHECK: clfith %r0, 0
0xec 0x00 0x00 0x00 0x20 0x73

Expand Down Expand Up @@ -3910,6 +3934,12 @@
# CHECK: clg %r15, 0
0xe3 0xf0 0x00 0x00 0x00 0x21

# CHECK: clgit %r0, 0, 0
0xec 0x00 0x00 0x00 0x00 0x71

# CHECK: clgit %r0, 0, 15
0xec 0x00 0x00 0x00 0xf0 0x71

# CHECK: clgith %r0, 0
0xec 0x00 0x00 0x00 0x20 0x71

Expand Down Expand Up @@ -4447,6 +4477,12 @@
# CHECK: clrb %r0, %r0, 15, 0
0xec 0x00 0x00 0x00 0xf0 0xf7

# CHECK: clgrt %r0, %r1, 0
0xb9 0x61 0x00 0x01

# CHECK: clgrt %r0, %r1, 15
0xb9 0x61 0xf0 0x01

# CHECK: clgrth %r0, %r1
0xb9 0x61 0x20 0x01

Expand All @@ -4465,6 +4501,12 @@
# CHECK: clgrtle %r0, %r1
0xb9 0x61 0xc0 0x01

# CHECK: clrt %r0, %r1, 0
0xb9 0x73 0x00 0x01

# CHECK: clrt %r0, %r1, 15
0xb9 0x73 0xf0 0x01

# CHECK: clrth %r0, %r1
0xb9 0x73 0x20 0x01

Expand All @@ -4483,6 +4525,12 @@
# CHECK: clrtle %r0, %r1
0xb9 0x73 0xc0 0x01

# CHECK: clt %r0, 0, -524288
0xeb 0x00 0x00 0x00 0x80 0x23

# CHECK: clt %r0, 15, 32768
0xeb 0x0f 0x00 0x00 0x08 0x23

# CHECK: clth %r0, -524288
0xeb 0x02 0x00 0x00 0x80 0x23

Expand Down Expand Up @@ -4525,6 +4573,12 @@
# CHECK: cltle %r1, 0
0xeb 0x1c 0x00 0x00 0x00 0x23

# CHECK: clgt %r0, 0, -524288
0xeb 0x00 0x00 0x00 0x80 0x2b

# CHECK: clgt %r0, 15, 32768
0xeb 0x0f 0x00 0x00 0x08 0x2b

# CHECK: clgth %r0, -524288
0xeb 0x02 0x00 0x00 0x80 0x2b

Expand Down Expand Up @@ -4792,6 +4846,12 @@
# CHECK: crdte %r4, %r5, %r6, 7
0xb9 0x8f 0x57 0x46

# CHECK: crt %r0, %r1, 0
0xb9 0x72 0x00 0x01

# CHECK: crt %r0, %r1, 15
0xb9 0x72 0xf0 0x01

# CHECK: crth %r0, %r1
0xb9 0x72 0x20 0x01

Expand Down Expand Up @@ -7972,6 +8032,18 @@
# CHECK: lcdbr %f15, %f9
0xb3 0x13 0x00 0xf9

# CHECK: lcdfr %f0, %f9
0xb3 0x73 0x00 0x09

# CHECK: lcdfr %f0, %f15
0xb3 0x73 0x00 0x0f

# CHECK: lcdfr %f15, %f0
0xb3 0x73 0x00 0xf0

# CHECK: lcdfr %f15, %f9
0xb3 0x73 0x00 0xf9

# CHECK: lcdr %f0, %f9
0x23 0x09

Expand Down Expand Up @@ -9570,6 +9642,18 @@
# CHECK: lndbr %f15, %f9
0xb3 0x11 0x00 0xf9

# CHECK: lndfr %f0, %f9
0xb3 0x71 0x00 0x09

# CHECK: lndfr %f0, %f15
0xb3 0x71 0x00 0x0f

# CHECK: lndfr %f15, %f0
0xb3 0x71 0x00 0xf0

# CHECK: lndfr %f15, %f9
0xb3 0x71 0x00 0xf9

# CHECK: lndr %f0, %f9
0x21 0x09

Expand Down Expand Up @@ -9909,6 +9993,18 @@
# CHECK: lpdbr %f15, %f9
0xb3 0x10 0x00 0xf9

# CHECK: lpdfr %f0, %f9
0xb3 0x70 0x00 0x09

# CHECK: lpdfr %f0, %f15
0xb3 0x70 0x00 0x0f

# CHECK: lpdfr %f15, %f0
0xb3 0x70 0x00 0xf0

# CHECK: lpdfr %f15, %f9
0xb3 0x70 0x00 0xf9

# CHECK: lpdg %r0, 0, 0
0xc8 0x05 0x00 0x00 0x00 0x00

Expand Down Expand Up @@ -10656,18 +10752,6 @@
# CHECK: lxdbr %f13, %f15
0xb3 0x05 0x00 0xdf

# CHECK: lxdr %f0, %f8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you removing these? That isn't mentioned in the commit message at all ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my apologies, it seems i messed up the commits i aggregated into this PR. I believe i have now fixed the issues mentioned.

0xb3 0x25 0x00 0x08

# CHECK: lxdr %f0, %f13
0xb3 0x25 0x00 0x0d

# CHECK: lxdr %f13, %f0
0xb3 0x25 0x00 0xd0

# CHECK: lxdr %f13, %f15
0xb3 0x25 0x00 0xdf

# CHECK: lxdtr %f0, %f0, 15
0xb3 0xdc 0x0f 0x00

Expand Down
7 changes: 7 additions & 0 deletions llvm/test/MC/Disassembler/SystemZ/invalid-regs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@
# CHECK-NEXT: 0xb9 0x97 0x00 0x18
# CHECK-NEXT: ^
0xb9 0x97 0x00 0x18

# This would be "cutfu %r1, %r2", but %r1 is invalid.
#
# CHECK-NEXT: warning: invalid instruction encoding
# CHECK-NEXT: 0xb2 0xa7 0x00 0x12
# CHECK-NEXT: ^
0xb2 0xa7 0x00 0x12
30 changes: 30 additions & 0 deletions llvm/test/MC/SystemZ/insn-good.s
Original file line number Diff line number Diff line change
Expand Up @@ -9038,6 +9038,36 @@
lcdbr %f15,%f0
lcdbr %f15,%f9

#CHECK: lcdfr %f0, %f9 # encoding: [0xb3,0x73,0x00,0x09]
#CHECK: lcdfr %f0, %f15 # encoding: [0xb3,0x73,0x00,0x0f]
#CHECK: lcdfr %f15, %f0 # encoding: [0xb3,0x73,0x00,0xf0]
#CHECK: lcdfr %f15, %f9 # encoding: [0xb3,0x73,0x00,0xf9]

lcdfr %f0,%f9
lcdfr %f0,%f15
lcdfr %f15,%f0
lcdfr %f15,%f9

#CHECK: lndfr %f0, %f9 # encoding: [0xb3,0x71,0x00,0x09]
#CHECK: lndfr %f0, %f15 # encoding: [0xb3,0x71,0x00,0x0f]
#CHECK: lndfr %f15, %f0 # encoding: [0xb3,0x71,0x00,0xf0]
#CHECK: lndfr %f15, %f9 # encoding: [0xb3,0x71,0x00,0xf9]

lndfr %f0,%f9
lndfr %f0,%f15
lndfr %f15,%f0
lndfr %f15,%f9

#CHECK: lpdfr %f0, %f9 # encoding: [0xb3,0x70,0x00,0x09]
#CHECK: lpdfr %f0, %f15 # encoding: [0xb3,0x70,0x00,0x0f]
#CHECK: lpdfr %f15, %f0 # encoding: [0xb3,0x70,0x00,0xf0]
#CHECK: lpdfr %f15, %f9 # encoding: [0xb3,0x70,0x00,0xf9]

lpdfr %f0,%f9
lpdfr %f0,%f15
lpdfr %f15,%f0
lpdfr %f15,%f9

#CHECK: lcdr %f0, %f9 # encoding: [0x23,0x09]
#CHECK: lcdr %f0, %f15 # encoding: [0x23,0x0f]
#CHECK: lcdr %f15, %f0 # encoding: [0x23,0xf0]
Expand Down
Loading