aboutsummaryrefslogtreecommitdiff
path: root/test/MC
diff options
context:
space:
mode:
authorTony Jiang <jtony@ca.ibm.com>2017-09-19 15:22:36 +0000
committerTony Jiang <jtony@ca.ibm.com>2017-09-19 15:22:36 +0000
commit9488976a0f36c168eee920819fe830372a310a71 (patch)
treed480b95eba3ff19f52356259da65679cf2ae162c /test/MC
parent7414b5dffddbde8a039bad1a5ff23ad3c3c3a896 (diff)
downloadllvm-9488976a0f36c168eee920819fe830372a310a71.tar.gz
[Power9] Add missing Power9 instructions.
The following 8 instructions are implemented in this patch. addpcis(subpcis, lnia), darn, maddhd, maddhdu, maddld, setb git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/Disassembler/PowerPC/ppc64-encoding.txt21
-rw-r--r--test/MC/PowerPC/ppc64-encoding.s32
2 files changed, 53 insertions, 0 deletions
diff --git a/test/MC/Disassembler/PowerPC/ppc64-encoding.txt b/test/MC/Disassembler/PowerPC/ppc64-encoding.txt
index 0877e8d4033..6b052474310 100644
--- a/test/MC/Disassembler/PowerPC/ppc64-encoding.txt
+++ b/test/MC/Disassembler/PowerPC/ppc64-encoding.txt
@@ -328,6 +328,27 @@
# CHECK: mulhwu. 2, 3, 4
0x7c 0x43 0x20 0x17
+# CHECK: maddhd 2, 3, 4, 5
+0x10 0x43 0x21 0x70
+
+# CHECK: maddhdu 2, 3, 4, 5
+0x10 0x43 0x21 0x71
+
+# CHECK: maddld 2, 3, 4, 5
+0x10 0x43 0x21 0x73
+
+# CHECK: setb 2, 3
+0x7c 0x4c 0x01 0x00
+
+# CHECK: darn 2, 3
+0x7c 0x43 0x05 0xe6
+
+# CHECK: addpcis 3, 22627
+0x4c,0x71,0x58,0x45
+
+# CHECK: lnia 3
+0x4c,0x60,0x00,0x04
+
# CHECK: divw 2, 3, 4
0x7c 0x43 0x23 0xd6
diff --git a/test/MC/PowerPC/ppc64-encoding.s b/test/MC/PowerPC/ppc64-encoding.s
index 4a2c6ab9ae9..18d405d27e6 100644
--- a/test/MC/PowerPC/ppc64-encoding.s
+++ b/test/MC/PowerPC/ppc64-encoding.s
@@ -460,6 +460,38 @@
# CHECK-LE: mulhwu. 2, 3, 4 # encoding: [0x17,0x20,0x43,0x7c]
mulhwu. 2, 3, 4
+# CHECK-BE: maddhd 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x70]
+# CHECK-LE: maddhd 2, 3, 4, 5 # encoding: [0x70,0x21,0x43,0x10]
+ maddhd 2, 3, 4, 5
+
+# CHECK-BE: maddhdu 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x71]
+# CHECK-LE: maddhdu 2, 3, 4, 5 # encoding: [0x71,0x21,0x43,0x10]
+ maddhdu 2, 3, 4, 5
+
+# CHECK-BE: maddld 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x73]
+# CHECK-LE: maddld 2, 3, 4, 5 # encoding: [0x73,0x21,0x43,0x10]
+ maddld 2, 3, 4, 5
+
+# CHECK-BE: setb 2, 3 # encoding: [0x7c,0x4c,0x01,0x00]
+# CHECK-LE: setb 2, 3 # encoding: [0x00,0x01,0x4c,0x7c]
+ setb 2, 3
+
+# CHECK-BE: darn 2, 3 # encoding: [0x7c,0x43,0x05,0xe6]
+# CHECK-LE: darn 2, 3 # encoding: [0xe6,0x05,0x43,0x7c]
+ darn 2, 3
+
+# CHECK-BE: addpcis 3, 22627 # encoding: [0x4c,0x71,0x58,0x45]
+# CHECK-LE: addpcis 3, 22627 # encoding: [0x45,0x58,0x71,0x4c]
+ addpcis 3, 22627
+
+# CHECK-BE: addpcis 3, 22627 # encoding: [0x4c,0x71,0x58,0x45]
+# CHECK-LE: addpcis 3, 22627 # encoding: [0x45,0x58,0x71,0x4c]
+ subpcis 3, -22627
+
+# CHECK-BE: lnia 3 # encoding: [0x4c,0x60,0x00,0x04]
+# CHECK-LE: lnia 3 # encoding: [0x04,0x00,0x60,0x4c]
+ lnia 3
+
# CHECK-BE: divw 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd6]
# CHECK-LE: divw 2, 3, 4 # encoding: [0xd6,0x23,0x43,0x7c]
divw 2, 3, 4