diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-10-01 15:00:44 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-10-01 15:00:44 +0000 |
commit | e22c56d6d81b84d6f4ba24c2f5b0b203e7ddffe9 (patch) | |
tree | 2cb11c268f8f3373416cf3fc1400a62ba4701ba3 /test/MC | |
parent | 185ef05ad6fdcaad1e831020b1f88d0046dd15d6 (diff) | |
download | external_llvm-e22c56d6d81b84d6f4ba24c2f5b0b203e7ddffe9.zip external_llvm-e22c56d6d81b84d6f4ba24c2f5b0b203e7ddffe9.tar.gz external_llvm-e22c56d6d81b84d6f4ba24c2f5b0b203e7ddffe9.tar.bz2 |
[SystemZ] Add comparisons of high words and memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/Disassembler/SystemZ/insns.txt | 60 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-bad-z196.s | 16 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-bad.s | 10 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-good-z196.s | 44 |
4 files changed, 130 insertions, 0 deletions
diff --git a/test/MC/Disassembler/SystemZ/insns.txt b/test/MC/Disassembler/SystemZ/insns.txt index f88531b..982b35f 100644 --- a/test/MC/Disassembler/SystemZ/insns.txt +++ b/test/MC/Disassembler/SystemZ/insns.txt @@ -1216,6 +1216,36 @@ # CHECK: cgxbr %r15, 0, %f0 0xb3 0xaa 0x00 0xf0 +# CHECK: chf %r0, -524288 +0xe3 0x00 0x00 0x00 0x80 0xcd + +# CHECK: chf %r0, -1 +0xe3 0x00 0x0f 0xff 0xff 0xcd + +# CHECK: chf %r0, 0 +0xe3 0x00 0x00 0x00 0x00 0xcd + +# CHECK: chf %r0, 1 +0xe3 0x00 0x00 0x01 0x00 0xcd + +# CHECK: chf %r0, 524287 +0xe3 0x00 0x0f 0xff 0x7f 0xcd + +# CHECK: chf %r0, 0(%r1) +0xe3 0x00 0x10 0x00 0x00 0xcd + +# CHECK: chf %r0, 0(%r15) +0xe3 0x00 0xf0 0x00 0x00 0xcd + +# CHECK: chf %r0, 524287(%r1,%r15) +0xe3 0x01 0xff 0xff 0x7f 0xcd + +# CHECK: chf %r0, 524287(%r15,%r1) +0xe3 0x0f 0x1f 0xff 0x7f 0xcd + +# CHECK: chf %r15, 0 +0xe3 0xf0 0x00 0x00 0x00 0xcd + # CHECK: chhsi 0, 0 0xe5 0x54 0x00 0x00 0x00 0x00 @@ -1549,6 +1579,36 @@ # CHECK: clg %r15, 0 0xe3 0xf0 0x00 0x00 0x00 0x21 +# CHECK: clhf %r0, -524288 +0xe3 0x00 0x00 0x00 0x80 0xcf + +# CHECK: clhf %r0, -1 +0xe3 0x00 0x0f 0xff 0xff 0xcf + +# CHECK: clhf %r0, 0 +0xe3 0x00 0x00 0x00 0x00 0xcf + +# CHECK: clhf %r0, 1 +0xe3 0x00 0x00 0x01 0x00 0xcf + +# CHECK: clhf %r0, 524287 +0xe3 0x00 0x0f 0xff 0x7f 0xcf + +# CHECK: clhf %r0, 0(%r1) +0xe3 0x00 0x10 0x00 0x00 0xcf + +# CHECK: clhf %r0, 0(%r15) +0xe3 0x00 0xf0 0x00 0x00 0xcf + +# CHECK: clhf %r0, 524287(%r1,%r15) +0xe3 0x01 0xff 0xff 0x7f 0xcf + +# CHECK: clhf %r0, 524287(%r15,%r1) +0xe3 0x0f 0x1f 0xff 0x7f 0xcf + +# CHECK: clhf %r15, 0 +0xe3 0xf0 0x00 0x00 0x00 0xcf + # CHECK: clhhsi 0, 0 0xe5 0x55 0x00 0x00 0x00 0x00 diff --git a/test/MC/SystemZ/insn-bad-z196.s b/test/MC/SystemZ/insn-bad-z196.s index e387f14..089d9b5 100644 --- a/test/MC/SystemZ/insn-bad-z196.s +++ b/test/MC/SystemZ/insn-bad-z196.s @@ -33,6 +33,14 @@ aih %r0, (1 << 31) #CHECK: error: invalid operand +#CHECK: chf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: chf %r0, 524288 + + chf %r0, -524289 + chf %r0, 524288 + +#CHECK: error: invalid operand #CHECK: cih %r0, (-1 << 31) - 1 #CHECK: error: invalid operand #CHECK: cih %r0, (1 << 31) @@ -41,6 +49,14 @@ cih %r0, (1 << 31) #CHECK: error: invalid operand +#CHECK: clhf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: clhf %r0, 524288 + + clhf %r0, -524289 + clhf %r0, 524288 + +#CHECK: error: invalid operand #CHECK: clih %r0, -1 #CHECK: error: invalid operand #CHECK: clih %r0, (1 << 32) diff --git a/test/MC/SystemZ/insn-bad.s b/test/MC/SystemZ/insn-bad.s index 8de2061..64453a5 100644 --- a/test/MC/SystemZ/insn-bad.s +++ b/test/MC/SystemZ/insn-bad.s @@ -612,6 +612,11 @@ ch %r0, -1 ch %r0, 4096 +#CHECK: error: {{(instruction requires: high-word)?}} +#CHECK: chf %r0, 0 + + chf %r0, 0 + #CHECK: error: invalid operand #CHECK: chhsi -1, 0 #CHECK: error: invalid operand @@ -766,6 +771,11 @@ clc 0(1,%r2), 0(%r1,%r2) clc 0(-), 0 +#CHECK: error: {{(instruction requires: high-word)?}} +#CHECK: clhf %r0, 0 + + clhf %r0, 0 + #CHECK: error: invalid operand #CHECK: clfhsi -1, 0 #CHECK: error: invalid operand diff --git a/test/MC/SystemZ/insn-good-z196.s b/test/MC/SystemZ/insn-good-z196.s index 93687ea..258e06f 100644 --- a/test/MC/SystemZ/insn-good-z196.s +++ b/test/MC/SystemZ/insn-good-z196.s @@ -135,6 +135,28 @@ ark %r15,%r0,%r0 ark %r7,%r8,%r9 +#CHECK: chf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0xcd] +#CHECK: chf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0xcd] +#CHECK: chf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0xcd] +#CHECK: chf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0xcd] +#CHECK: chf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0xcd] +#CHECK: chf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0xcd] +#CHECK: chf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0xcd] +#CHECK: chf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0xcd] +#CHECK: chf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0xcd] +#CHECK: chf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0xcd] + + chf %r0, -524288 + chf %r0, -1 + chf %r0, 0 + chf %r0, 1 + chf %r0, 524287 + chf %r0, 0(%r1) + chf %r0, 0(%r15) + chf %r0, 524287(%r1,%r15) + chf %r0, 524287(%r15,%r1) + chf %r15, 0 + #CHECK: cih %r0, -2147483648 # encoding: [0xcc,0x0d,0x80,0x00,0x00,0x00] #CHECK: cih %r0, -1 # encoding: [0xcc,0x0d,0xff,0xff,0xff,0xff] #CHECK: cih %r0, 0 # encoding: [0xcc,0x0d,0x00,0x00,0x00,0x00] @@ -149,6 +171,28 @@ cih %r0, (1 << 31) - 1 cih %r15, 0 +#CHECK: clhf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0xcf] +#CHECK: clhf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0xcf] +#CHECK: clhf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0xcf] +#CHECK: clhf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0xcf] +#CHECK: clhf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0xcf] +#CHECK: clhf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0xcf] +#CHECK: clhf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0xcf] +#CHECK: clhf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0xcf] +#CHECK: clhf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0xcf] +#CHECK: clhf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0xcf] + + clhf %r0, -524288 + clhf %r0, -1 + clhf %r0, 0 + clhf %r0, 1 + clhf %r0, 524287 + clhf %r0, 0(%r1) + clhf %r0, 0(%r15) + clhf %r0, 524287(%r1,%r15) + clhf %r0, 524287(%r15,%r1) + clhf %r15, 0 + #CHECK: clih %r0, 0 # encoding: [0xcc,0x0f,0x00,0x00,0x00,0x00] #CHECK: clih %r0, 1 # encoding: [0xcc,0x0f,0x00,0x00,0x00,0x01] #CHECK: clih %r0, 4294967295 # encoding: [0xcc,0x0f,0xff,0xff,0xff,0xff] |