diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-05-15 15:05:29 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-05-15 15:05:29 +0000 |
commit | ddbf053a4cad58393a389f264c51923111eba3db (patch) | |
tree | 07efd34a12f337269db416df50dbcc217c42bb03 /test/MC | |
parent | e66ef733188f06f24baa8fe496abd9eab442b3b0 (diff) | |
download | external_llvm-ddbf053a4cad58393a389f264c51923111eba3db.zip external_llvm-ddbf053a4cad58393a389f264c51923111eba3db.tar.gz external_llvm-ddbf053a4cad58393a389f264c51923111eba3db.tar.bz2 |
[SystemZ] Make use of SUBTRACT HALFWORD
Thanks to Ulrich Weigand for noticing that this instruction was missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181893 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/Disassembler/SystemZ/insns.txt | 51 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-bad.s | 16 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-good.s | 38 |
3 files changed, 105 insertions, 0 deletions
diff --git a/test/MC/Disassembler/SystemZ/insns.txt b/test/MC/Disassembler/SystemZ/insns.txt index 9202a0f..56236f7 100644 --- a/test/MC/Disassembler/SystemZ/insns.txt +++ b/test/MC/Disassembler/SystemZ/insns.txt @@ -4879,6 +4879,57 @@ # CHECK: sg %r15, 0 0xe3 0xf0 0x00 0x00 0x00 0x09 +# CHECK: sh %r0, 0 +0x4b 0x00 0x00 0x00 + +# CHECK: sh %r0, 4095 +0x4b 0x00 0x0f 0xff + +# CHECK: sh %r0, 0(%r1) +0x4b 0x00 0x10 0x00 + +# CHECK: sh %r0, 0(%r15) +0x4b 0x00 0xf0 0x00 + +# CHECK: sh %r0, 4095(%r1,%r15) +0x4b 0x01 0xff 0xff + +# CHECK: sh %r0, 4095(%r15,%r1) +0x4b 0x0f 0x1f 0xff + +# CHECK: sh %r15, 0 +0x4b 0xf0 0x00 0x00 + +# CHECK: shy %r0, -524288 +0xe3 0x00 0x00 0x00 0x80 0x7b + +# CHECK: shy %r0, -1 +0xe3 0x00 0x0f 0xff 0xff 0x7b + +# CHECK: shy %r0, 0 +0xe3 0x00 0x00 0x00 0x00 0x7b + +# CHECK: shy %r0, 1 +0xe3 0x00 0x00 0x01 0x00 0x7b + +# CHECK: shy %r0, 524287 +0xe3 0x00 0x0f 0xff 0x7f 0x7b + +# CHECK: shy %r0, 0(%r1) +0xe3 0x00 0x10 0x00 0x00 0x7b + +# CHECK: shy %r0, 0(%r15) +0xe3 0x00 0xf0 0x00 0x00 0x7b + +# CHECK: shy %r0, 524287(%r1,%r15) +0xe3 0x01 0xff 0xff 0x7f 0x7b + +# CHECK: shy %r0, 524287(%r15,%r1) +0xe3 0x0f 0x1f 0xff 0x7f 0x7b + +# CHECK: shy %r15, 0 +0xe3 0xf0 0x00 0x00 0x00 0x7b + # CHECK: slbgr %r0, %r0 0xb9 0x89 0x00 0x00 diff --git a/test/MC/SystemZ/insn-bad.s b/test/MC/SystemZ/insn-bad.s index 11e02a1..6891fa9 100644 --- a/test/MC/SystemZ/insn-bad.s +++ b/test/MC/SystemZ/insn-bad.s @@ -2338,6 +2338,22 @@ sgf %r0, 524288 #CHECK: error: invalid operand +#CHECK: sh %r0, -1 +#CHECK: error: invalid operand +#CHECK: sh %r0, 4096 + + sh %r0, -1 + sh %r0, 4096 + +#CHECK: error: invalid operand +#CHECK: shy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: shy %r0, 524288 + + shy %r0, -524289 + shy %r0, 524288 + +#CHECK: error: invalid operand #CHECK: sl %r0, -1 #CHECK: error: invalid operand #CHECK: sl %r0, 4096 diff --git a/test/MC/SystemZ/insn-good.s b/test/MC/SystemZ/insn-good.s index 7dc09b8..99548ab 100644 --- a/test/MC/SystemZ/insn-good.s +++ b/test/MC/SystemZ/insn-good.s @@ -5081,6 +5081,44 @@ sgr %r15,%r0 sgr %r7,%r8 +#CHECK: sh %r0, 0 # encoding: [0x4b,0x00,0x00,0x00] +#CHECK: sh %r0, 4095 # encoding: [0x4b,0x00,0x0f,0xff] +#CHECK: sh %r0, 0(%r1) # encoding: [0x4b,0x00,0x10,0x00] +#CHECK: sh %r0, 0(%r15) # encoding: [0x4b,0x00,0xf0,0x00] +#CHECK: sh %r0, 4095(%r1,%r15) # encoding: [0x4b,0x01,0xff,0xff] +#CHECK: sh %r0, 4095(%r15,%r1) # encoding: [0x4b,0x0f,0x1f,0xff] +#CHECK: sh %r15, 0 # encoding: [0x4b,0xf0,0x00,0x00] + + sh %r0, 0 + sh %r0, 4095 + sh %r0, 0(%r1) + sh %r0, 0(%r15) + sh %r0, 4095(%r1,%r15) + sh %r0, 4095(%r15,%r1) + sh %r15, 0 + +#CHECK: shy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x7b] +#CHECK: shy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x7b] +#CHECK: shy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x7b] +#CHECK: shy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x7b] +#CHECK: shy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x7b] +#CHECK: shy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x7b] +#CHECK: shy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x7b] +#CHECK: shy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x7b] +#CHECK: shy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x7b] +#CHECK: shy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x7b] + + shy %r0, -524288 + shy %r0, -1 + shy %r0, 0 + shy %r0, 1 + shy %r0, 524287 + shy %r0, 0(%r1) + shy %r0, 0(%r15) + shy %r0, 524287(%r1,%r15) + shy %r0, 524287(%r15,%r1) + shy %r15, 0 + #CHECK: sl %r0, 0 # encoding: [0x5f,0x00,0x00,0x00] #CHECK: sl %r0, 4095 # encoding: [0x5f,0x00,0x0f,0xff] #CHECK: sl %r0, 0(%r1) # encoding: [0x5f,0x00,0x10,0x00] |