diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-10-01 12:11:47 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-10-01 12:11:47 +0000 |
commit | ced450f0e6266eb8c2624fc1895cbc2749d715c3 (patch) | |
tree | 1f12f564ed9f888409bda19564d7cf132a894f9c /test/MC | |
parent | 55d7d83b6c9e55fa73d667660c8e90f92999385b (diff) | |
download | external_llvm-ced450f0e6266eb8c2624fc1895cbc2749d715c3.zip external_llvm-ced450f0e6266eb8c2624fc1895cbc2749d715c3.tar.gz external_llvm-ced450f0e6266eb8c2624fc1895cbc2749d715c3.tar.bz2 |
[SystemZ] Add sign-extending high-word loads (LBH and LHH)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191740 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 afd09b5..634ee87 100644 --- a/test/MC/Disassembler/SystemZ/insns.txt +++ b/test/MC/Disassembler/SystemZ/insns.txt @@ -2461,6 +2461,36 @@ # CHECK: lb %r15, 0 0xe3 0xf0 0x00 0x00 0x00 0x76 +# CHECK: lbh %r0, -524288 +0xe3 0x00 0x00 0x00 0x80 0xc0 + +# CHECK: lbh %r0, -1 +0xe3 0x00 0x0f 0xff 0xff 0xc0 + +# CHECK: lbh %r0, 0 +0xe3 0x00 0x00 0x00 0x00 0xc0 + +# CHECK: lbh %r0, 1 +0xe3 0x00 0x00 0x01 0x00 0xc0 + +# CHECK: lbh %r0, 524287 +0xe3 0x00 0x0f 0xff 0x7f 0xc0 + +# CHECK: lbh %r0, 0(%r1) +0xe3 0x00 0x10 0x00 0x00 0xc0 + +# CHECK: lbh %r0, 0(%r15) +0xe3 0x00 0xf0 0x00 0x00 0xc0 + +# CHECK: lbh %r0, 524287(%r1,%r15) +0xe3 0x01 0xff 0xff 0x7f 0xc0 + +# CHECK: lbh %r0, 524287(%r15,%r1) +0xe3 0x0f 0x1f 0xff 0x7f 0xc0 + +# CHECK: lbh %r15, 0 +0xe3 0xf0 0x00 0x00 0x00 0xc0 + # CHECK: lcdbr %f0, %f9 0xb3 0x13 0x00 0x09 @@ -3007,6 +3037,36 @@ # CHECK: lhi %r15, 0 0xa7 0xf8 0x00 0x00 +# CHECK: lhh %r0, -524288 +0xe3 0x00 0x00 0x00 0x80 0xc4 + +# CHECK: lhh %r0, -1 +0xe3 0x00 0x0f 0xff 0xff 0xc4 + +# CHECK: lhh %r0, 0 +0xe3 0x00 0x00 0x00 0x00 0xc4 + +# CHECK: lhh %r0, 1 +0xe3 0x00 0x00 0x01 0x00 0xc4 + +# CHECK: lhh %r0, 524287 +0xe3 0x00 0x0f 0xff 0x7f 0xc4 + +# CHECK: lhh %r0, 0(%r1) +0xe3 0x00 0x10 0x00 0x00 0xc4 + +# CHECK: lhh %r0, 0(%r15) +0xe3 0x00 0xf0 0x00 0x00 0xc4 + +# CHECK: lhh %r0, 524287(%r1,%r15) +0xe3 0x01 0xff 0xff 0x7f 0xc4 + +# CHECK: lhh %r0, 524287(%r15,%r1) +0xe3 0x0f 0x1f 0xff 0x7f 0xc4 + +# CHECK: lhh %r15, 0 +0xe3 0xf0 0x00 0x00 0x00 0xc4 + # CHECK: lhr %r0, %r15 0xb9 0x27 0x00 0x0f diff --git a/test/MC/SystemZ/insn-bad-z196.s b/test/MC/SystemZ/insn-bad-z196.s index cc795d4..6214b8e 100644 --- a/test/MC/SystemZ/insn-bad-z196.s +++ b/test/MC/SystemZ/insn-bad-z196.s @@ -73,6 +73,14 @@ fixbra %f2, 0, %f0, 0 #CHECK: error: invalid operand +#CHECK: lbh %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lbh %r0, 524288 + + lbh %r0, -524289 + lbh %r0, 524288 + +#CHECK: error: invalid operand #CHECK: lfh %r0, -524289 #CHECK: error: invalid operand #CHECK: lfh %r0, 524288 @@ -81,6 +89,14 @@ lfh %r0, 524288 #CHECK: error: invalid operand +#CHECK: lhh %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lhh %r0, 524288 + + lhh %r0, -524289 + lhh %r0, 524288 + +#CHECK: error: invalid operand #CHECK: loc %r0,0,-1 #CHECK: error: invalid operand #CHECK: loc %r0,0,16 diff --git a/test/MC/SystemZ/insn-bad.s b/test/MC/SystemZ/insn-bad.s index 2420e40..8bfb134 100644 --- a/test/MC/SystemZ/insn-bad.s +++ b/test/MC/SystemZ/insn-bad.s @@ -1390,6 +1390,11 @@ lb %r0, -524289 lb %r0, 524288 +#CHECK: error: {{(instruction requires: high-word)?}} +#CHECK: lbh %r0, 0 + + lbh %r0, 0 + #CHECK: error: invalid register pair #CHECK: lcxbr %f0, %f2 #CHECK: error: invalid register pair @@ -1560,6 +1565,11 @@ lh %r0, -1 lh %r0, 4096 +#CHECK: error: {{(instruction requires: high-word)?}} +#CHECK: lhh %r0, 0 + + lhh %r0, 0 + #CHECK: error: invalid operand #CHECK: lhi %r0, -32769 #CHECK: error: invalid operand diff --git a/test/MC/SystemZ/insn-good-z196.s b/test/MC/SystemZ/insn-good-z196.s index 66ce63a..fa4471e 100644 --- a/test/MC/SystemZ/insn-good-z196.s +++ b/test/MC/SystemZ/insn-good-z196.s @@ -163,6 +163,28 @@ fixbra %f4, 5, %f8, 9 fixbra %f13, 0, %f0, 0 +#CHECK: lbh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0xc0] +#CHECK: lbh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0xc0] +#CHECK: lbh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0xc0] +#CHECK: lbh %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0xc0] +#CHECK: lbh %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0xc0] +#CHECK: lbh %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0xc0] +#CHECK: lbh %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0xc0] +#CHECK: lbh %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0xc0] +#CHECK: lbh %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0xc0] +#CHECK: lbh %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0xc0] + + lbh %r0, -524288 + lbh %r0, -1 + lbh %r0, 0 + lbh %r0, 1 + lbh %r0, 524287 + lbh %r0, 0(%r1) + lbh %r0, 0(%r15) + lbh %r0, 524287(%r1,%r15) + lbh %r0, 524287(%r15,%r1) + lbh %r15, 0 + #CHECK: lfh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0xca] #CHECK: lfh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0xca] #CHECK: lfh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0xca] @@ -185,6 +207,28 @@ lfh %r0, 524287(%r15,%r1) lfh %r15, 0 +#CHECK: lhh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0xc4] +#CHECK: lhh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0xc4] +#CHECK: lhh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0xc4] +#CHECK: lhh %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0xc4] +#CHECK: lhh %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0xc4] +#CHECK: lhh %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0xc4] +#CHECK: lhh %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0xc4] +#CHECK: lhh %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0xc4] +#CHECK: lhh %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0xc4] +#CHECK: lhh %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0xc4] + + lhh %r0, -524288 + lhh %r0, -1 + lhh %r0, 0 + lhh %r0, 1 + lhh %r0, 524287 + lhh %r0, 0(%r1) + lhh %r0, 0(%r15) + lhh %r0, 524287(%r1,%r15) + lhh %r0, 524287(%r15,%r1) + lhh %r15, 0 + #CHECK: loc %r0, 0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0xf2] #CHECK: loc %r0, 0, 15 # encoding: [0xeb,0x0f,0x00,0x00,0x00,0xf2] #CHECK: loc %r0, -524288, 0 # encoding: [0xeb,0x00,0x00,0x00,0x80,0xf2] |