[llvm] [PowerPC] Add a set of extended mnemonics that are missing from Power 10. (PR #73003)

Stefan Pintilie via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 18:58:19 PST 2023


================
@@ -1044,3 +1044,301 @@
 # CHECK-BE: hashchkp 5, -512(1)                   # encoding: [0x7c,0x01,0x2d,0x64]
 # CHECK-LE: hashchkp 5, -512(1)                   # encoding: [0x64,0x2d,0x01,0x7c]
             hashchkp 5, -512(1)
+
+##
+## Extended Mnemonics
+##
+
+# CHECK-BE: wait                                  # encoding: [0x7c,0x00,0x00,0x3c]
+# CHECK-LE: wait                                  # encoding: [0x3c,0x00,0x00,0x7c]
+            wait
+# CHECK-BE: wait                                  # encoding: [0x7c,0x00,0x00,0x3c]
+# CHECK-LE: wait                                  # encoding: [0x3c,0x00,0x00,0x7c]
+            wait 0
+# CHECK-BE: waitrsv                               # encoding: [0x7c,0x20,0x00,0x3c]
+# CHECK-LE: waitrsv                               # encoding: [0x3c,0x00,0x20,0x7c]
+            wait 1
+# CHECK-BE: waitrsv                               # encoding: [0x7c,0x20,0x00,0x3c]
+# CHECK-LE: waitrsv                               # encoding: [0x3c,0x00,0x20,0x7c]
+            waitrsv
+# CHECK-BE: wait 2 0                              # encoding: [0x7c,0x40,0x00,0x3c]
+# CHECK-LE: wait 2 0                              # encoding: [0x3c,0x00,0x40,0x7c]
+            pause_short
+
+# CHECK-BE: sync                                  # encoding: [0x7c,0x00,0x04,0xac]
+# CHECK-LE: sync                                  # encoding: [0xac,0x04,0x00,0x7c]
+            sync
+# CHECK-BE: ptesync                               # encoding: [0x7c,0x40,0x04,0xac]
+# CHECK-LE: ptesync                               # encoding: [0xac,0x04,0x40,0x7c]
+            sync 2
+# CHECK-BE: sync                                  # encoding: [0x7c,0x00,0x04,0xac]
+# CHECK-LE: sync                                  # encoding: [0xac,0x04,0x00,0x7c]
+            hwsync
+# CHECK-BE: sync 1                                # encoding: [0x7c,0x20,0x04,0xac]
+# CHECK-LE: sync 1                                # encoding: [0xac,0x04,0x20,0x7c]
+            wsync
+# CHECK-BE: ptesync                               # encoding: [0x7c,0x40,0x04,0xac]
+# CHECK-LE: ptesync                               # encoding: [0xac,0x04,0x40,0x7c]
+            ptesync
+# CHECK-BE: phwsync                               # encoding: [0x7c,0x80,0x04,0xac]
+# CHECK-LE: phwsync                               # encoding: [0xac,0x04,0x80,0x7c]
+            phwsync
+# CHECK-BE: plwsync                               # encoding: [0x7c,0xa0,0x04,0xac]
+# CHECK-LE: plwsync                               # encoding: [0xac,0x04,0xa0,0x7c]
+            plwsync
+# CHECK-BE: stncisync                             # encoding: [0x7c,0x21,0x04,0xac]
+# CHECK-LE: stncisync                             # encoding: [0xac,0x04,0x21,0x7c]
+            stncisync
+# CHECK-BE: stcisync                              # encoding: [0x7c,0x02,0x04,0xac]
+# CHECK-LE: stcisync                              # encoding: [0xac,0x04,0x02,0x7c]
+            stcisync
+# CHECK-BE: stsync                                # encoding: [0x7c,0x03,0x04,0xac]
+# CHECK-LE: stsync                                # encoding: [0xac,0x04,0x03,0x7c]
+            stsync
+
+# CHECK-BE: paddi 4, 5, 17                        # encoding: [0x06,0x00,0x00,0x00,
+# CHECK-BE-SAME:                                               0x38,0x85,0x00,0x11]
+# CHECK-LE: paddi 4, 5, 17                        # encoding: [0x00,0x00,0x00,0x06,
+# CHECK-LE-SAME:                                               0x11,0x00,0x85,0x38]
+            paddi 4, 5, 17
+# CHECK-BE: pli 4, 17                             # encoding: [0x06,0x00,0x00,0x00,
+# CHECK-BE-SAME:                                               0x38,0x80,0x00,0x11]
+# CHECK-LE: pli 4, 17                             # encoding: [0x00,0x00,0x00,0x06,
+# CHECK-LE-SAME:                                               0x11,0x00,0x80,0x38]
+            pli 4, 17
+# CHECK-BE: paddi 4, 3, 24                        # encoding: [0x06,0x00,0x00,0x00,
+# CHECK-BE-SAME:                                               0x38,0x83,0x00,0x18]
+# CHECK-LE: paddi 4, 3, 24                        # encoding: [0x00,0x00,0x00,0x06,
+# CHECK-LE-SAME:                                               0x18,0x00,0x83,0x38]
+            pla 4, 24(3)
+# CHECK-BE: paddi 4, 0, 24, 1                     # encoding: [0x06,0x10,0x00,0x00,
+# CHECK-BE-SAME:                                               0x38,0x80,0x00,0x18]
+# CHECK-LE: paddi 4, 0, 24, 1                     # encoding: [0x00,0x00,0x10,0x06,
+# CHECK-LE-SAME:                                               0x18,0x00,0x80,0x38]
+            pla 4, 24
----------------
stefanp-ibm wrote:

I will change the immediate values to force the instruction to use more than 16 bits.
I'm going to use `4294965249` = `fffff801`

https://github.com/llvm/llvm-project/pull/73003


More information about the llvm-commits mailing list