diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-07-19 16:32:12 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-07-19 16:32:12 +0000 |
commit | 70d3e71f2e44250594f1b6edd7bbbf8b945a4452 (patch) | |
tree | 68472e7919cdb043d15c42a5f15dbf382117f808 /test/MC | |
parent | dc05e0bff67f818e615a47e831ff92d65ee0ac64 (diff) | |
download | external_llvm-70d3e71f2e44250594f1b6edd7bbbf8b945a4452.zip external_llvm-70d3e71f2e44250594f1b6edd7bbbf8b945a4452.tar.gz external_llvm-70d3e71f2e44250594f1b6edd7bbbf8b945a4452.tar.bz2 |
[SystemZ] Add AHIK and AGHIK
I did these as a separate patch because it uses a slightly different
form of RIE layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/Disassembler/SystemZ/insns.txt | 30 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-bad-z196.s | 23 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-bad.s | 10 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-good-z196.s | 36 |
4 files changed, 99 insertions, 0 deletions
diff --git a/test/MC/Disassembler/SystemZ/insns.txt b/test/MC/Disassembler/SystemZ/insns.txt index 4c0755a..e91be56 100644 --- a/test/MC/Disassembler/SystemZ/insns.txt +++ b/test/MC/Disassembler/SystemZ/insns.txt @@ -163,6 +163,21 @@ # CHECK: aghi %r15, 0 0xa7 0xfb 0x00 0x00 +# CHECK: aghik %r0, %r1, -32768 +0xec 0x01 0x80 0x00 0x00 0xd9 + +# CHECK: aghik %r2, %r3, -1 +0xec 0x23 0xff 0xff 0x00 0xd9 + +# CHECK: aghik %r4, %r5, 0 +0xec 0x45 0x00 0x00 0x00 0xd9 + +# CHECK: aghik %r6, %r7, 1 +0xec 0x67 0x00 0x01 0x00 0xd9 + +# CHECK: aghik %r8, %r15, 32767 +0xec 0x8f 0x7f 0xff 0x00 0xd9 + # CHECK: agr %r0, %r0 0xb9 0x08 0x00 0x00 @@ -268,6 +283,21 @@ # CHECK: ahi %r15, 0 0xa7 0xfa 0x00 0x00 +# CHECK: ahik %r0, %r1, -32768 +0xec 0x01 0x80 0x00 0x00 0xd8 + +# CHECK: ahik %r2, %r3, -1 +0xec 0x23 0xff 0xff 0x00 0xd8 + +# CHECK: ahik %r4, %r5, 0 +0xec 0x45 0x00 0x00 0x00 0xd8 + +# CHECK: ahik %r6, %r7, 1 +0xec 0x67 0x00 0x01 0x00 0xd8 + +# CHECK: ahik %r8, %r15, 32767 +0xec 0x8f 0x7f 0xff 0x00 0xd8 + # CHECK: ah %r0, 0 0x4a 0x00 0x00 0x00 diff --git a/test/MC/SystemZ/insn-bad-z196.s b/test/MC/SystemZ/insn-bad-z196.s index 0124401..b4dc529 100644 --- a/test/MC/SystemZ/insn-bad-z196.s +++ b/test/MC/SystemZ/insn-bad-z196.s @@ -1,6 +1,29 @@ # For z196 only. # RUN: not llvm-mc -triple s390x-linux-gnu -mcpu=z196 < %s 2> %t # RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: aghik %r0, %r1, -32769 +#CHECK: error: invalid operand +#CHECK: aghik %r0, %r1, 32768 +#CHECK: error: invalid operand +#CHECK: aghik %r0, %r1, foo + + aghik %r0, %r1, -32769 + aghik %r0, %r1, 32768 + aghik %r0, %r1, foo + +#CHECK: error: invalid operand +#CHECK: ahik %r0, %r1, -32769 +#CHECK: error: invalid operand +#CHECK: ahik %r0, %r1, 32768 +#CHECK: error: invalid operand +#CHECK: ahik %r0, %r1, foo + + ahik %r0, %r1, -32769 + ahik %r0, %r1, 32768 + ahik %r0, %r1, foo + #CHECK: error: invalid operand #CHECK: sllk %r0,%r0,-524289 #CHECK: error: invalid operand diff --git a/test/MC/SystemZ/insn-bad.s b/test/MC/SystemZ/insn-bad.s index 038f745..f0a8e41 100644 --- a/test/MC/SystemZ/insn-bad.s +++ b/test/MC/SystemZ/insn-bad.s @@ -70,6 +70,11 @@ aghi %r0, foo #CHECK: error: {{(instruction requires: distinct-ops)?}} +#CHECK: aghik %r1, %r2, 3 + + aghik %r1, %r2, 3 + +#CHECK: error: {{(instruction requires: distinct-ops)?}} #CHECK: agrk %r2,%r3,%r4 agrk %r2,%r3,%r4 @@ -110,6 +115,11 @@ ahi %r0, 32768 ahi %r0, foo +#CHECK: error: {{(instruction requires: distinct-ops)?}} +#CHECK: ahik %r1, %r2, 3 + + ahik %r1, %r2, 3 + #CHECK: error: invalid operand #CHECK: ahy %r0, -524289 #CHECK: error: invalid operand diff --git a/test/MC/SystemZ/insn-good-z196.s b/test/MC/SystemZ/insn-good-z196.s index 6e3a6a0..6bfb7e8 100644 --- a/test/MC/SystemZ/insn-good-z196.s +++ b/test/MC/SystemZ/insn-good-z196.s @@ -1,6 +1,24 @@ # For z196 and above. # RUN: llvm-mc -triple s390x-linux-gnu -mcpu=z196 -show-encoding %s | FileCheck %s +#CHECK: aghik %r0, %r0, -32768 # encoding: [0xec,0x00,0x80,0x00,0x00,0xd9] +#CHECK: aghik %r0, %r0, -1 # encoding: [0xec,0x00,0xff,0xff,0x00,0xd9] +#CHECK: aghik %r0, %r0, 0 # encoding: [0xec,0x00,0x00,0x00,0x00,0xd9] +#CHECK: aghik %r0, %r0, 1 # encoding: [0xec,0x00,0x00,0x01,0x00,0xd9] +#CHECK: aghik %r0, %r0, 32767 # encoding: [0xec,0x00,0x7f,0xff,0x00,0xd9] +#CHECK: aghik %r0, %r15, 0 # encoding: [0xec,0x0f,0x00,0x00,0x00,0xd9] +#CHECK: aghik %r15, %r0, 0 # encoding: [0xec,0xf0,0x00,0x00,0x00,0xd9] +#CHECK: aghik %r7, %r8, -16 # encoding: [0xec,0x78,0xff,0xf0,0x00,0xd9] + + aghik %r0, %r0, -32768 + aghik %r0, %r0, -1 + aghik %r0, %r0, 0 + aghik %r0, %r0, 1 + aghik %r0, %r0, 32767 + aghik %r0, %r15, 0 + aghik %r15, %r0, 0 + aghik %r7, %r8, -16 + #CHECK: agrk %r0, %r0, %r0 # encoding: [0xb9,0xe8,0x00,0x00] #CHECK: agrk %r0, %r0, %r15 # encoding: [0xb9,0xe8,0xf0,0x00] #CHECK: agrk %r0, %r15, %r0 # encoding: [0xb9,0xe8,0x00,0x0f] @@ -13,6 +31,24 @@ agrk %r15,%r0,%r0 agrk %r7,%r8,%r9 +#CHECK: ahik %r0, %r0, -32768 # encoding: [0xec,0x00,0x80,0x00,0x00,0xd8] +#CHECK: ahik %r0, %r0, -1 # encoding: [0xec,0x00,0xff,0xff,0x00,0xd8] +#CHECK: ahik %r0, %r0, 0 # encoding: [0xec,0x00,0x00,0x00,0x00,0xd8] +#CHECK: ahik %r0, %r0, 1 # encoding: [0xec,0x00,0x00,0x01,0x00,0xd8] +#CHECK: ahik %r0, %r0, 32767 # encoding: [0xec,0x00,0x7f,0xff,0x00,0xd8] +#CHECK: ahik %r0, %r15, 0 # encoding: [0xec,0x0f,0x00,0x00,0x00,0xd8] +#CHECK: ahik %r15, %r0, 0 # encoding: [0xec,0xf0,0x00,0x00,0x00,0xd8] +#CHECK: ahik %r7, %r8, -16 # encoding: [0xec,0x78,0xff,0xf0,0x00,0xd8] + + ahik %r0, %r0, -32768 + ahik %r0, %r0, -1 + ahik %r0, %r0, 0 + ahik %r0, %r0, 1 + ahik %r0, %r0, 32767 + ahik %r0, %r15, 0 + ahik %r15, %r0, 0 + ahik %r7, %r8, -16 + #CHECK: ark %r0, %r0, %r0 # encoding: [0xb9,0xf8,0x00,0x00] #CHECK: ark %r0, %r0, %r15 # encoding: [0xb9,0xf8,0xf0,0x00] #CHECK: ark %r0, %r15, %r0 # encoding: [0xb9,0xf8,0x00,0x0f] |