diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-10-01 14:53:46 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-10-01 14:53:46 +0000 |
commit | ad366a3f67679a56d25464dc2bcad3a0a6a51780 (patch) | |
tree | 39b7511c4c9ec60d3ce4c5738e98c350e38ce8f3 /test/MC/SystemZ | |
parent | bd1958d8e99ebd5a885f848b2f688c399cfc9886 (diff) | |
download | llvm-ad366a3f67679a56d25464dc2bcad3a0a6a51780.tar.gz llvm-ad366a3f67679a56d25464dc2bcad3a0a6a51780.tar.bz2 llvm-ad366a3f67679a56d25464dc2bcad3a0a6a51780.tar.xz |
[SystemZ] Add immediate addition involving high words
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/SystemZ')
-rw-r--r-- | test/MC/SystemZ/insn-bad-z196.s | 8 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-bad.s | 5 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-good-z196.s | 14 |
3 files changed, 27 insertions, 0 deletions
diff --git a/test/MC/SystemZ/insn-bad-z196.s b/test/MC/SystemZ/insn-bad-z196.s index 0ed33702e4..24640018a5 100644 --- a/test/MC/SystemZ/insn-bad-z196.s +++ b/test/MC/SystemZ/insn-bad-z196.s @@ -25,6 +25,14 @@ ahik %r0, %r1, foo #CHECK: error: invalid operand +#CHECK: aih %r0, (-1 << 31) - 1 +#CHECK: error: invalid operand +#CHECK: aih %r0, (1 << 31) + + aih %r0, (-1 << 31) - 1 + aih %r0, (1 << 31) + +#CHECK: error: invalid operand #CHECK: fidbra %f0, 0, %f0, -1 #CHECK: error: invalid operand #CHECK: fidbra %f0, 0, %f0, 16 diff --git a/test/MC/SystemZ/insn-bad.s b/test/MC/SystemZ/insn-bad.s index 3fe3f4d6a7..eadb9f0997 100644 --- a/test/MC/SystemZ/insn-bad.s +++ b/test/MC/SystemZ/insn-bad.s @@ -128,6 +128,11 @@ ahy %r0, -524289 ahy %r0, 524288 +#CHECK: error: {{(instruction requires: high-word)?}} +#CHECK: aih %r0, 0 + + aih %r0, 0 + #CHECK: error: invalid operand #CHECK: al %r0, -1 #CHECK: error: invalid operand diff --git a/test/MC/SystemZ/insn-good-z196.s b/test/MC/SystemZ/insn-good-z196.s index 769ab02ee4..2bc27bd58a 100644 --- a/test/MC/SystemZ/insn-good-z196.s +++ b/test/MC/SystemZ/insn-good-z196.s @@ -49,6 +49,20 @@ ahik %r15, %r0, 0 ahik %r7, %r8, -16 +#CHECK: aih %r0, -2147483648 # encoding: [0xcc,0x08,0x80,0x00,0x00,0x00] +#CHECK: aih %r0, -1 # encoding: [0xcc,0x08,0xff,0xff,0xff,0xff] +#CHECK: aih %r0, 0 # encoding: [0xcc,0x08,0x00,0x00,0x00,0x00] +#CHECK: aih %r0, 1 # encoding: [0xcc,0x08,0x00,0x00,0x00,0x01] +#CHECK: aih %r0, 2147483647 # encoding: [0xcc,0x08,0x7f,0xff,0xff,0xff] +#CHECK: aih %r15, 0 # encoding: [0xcc,0xf8,0x00,0x00,0x00,0x00] + + aih %r0, -1 << 31 + aih %r0, -1 + aih %r0, 0 + aih %r0, 1 + aih %r0, (1 << 31) - 1 + aih %r15, 0 + #CHECK: alghsik %r0, %r0, -32768 # encoding: [0xec,0x00,0x80,0x00,0x00,0xdb] #CHECK: alghsik %r0, %r0, -1 # encoding: [0xec,0x00,0xff,0xff,0x00,0xdb] #CHECK: alghsik %r0, %r0, 0 # encoding: [0xec,0x00,0x00,0x00,0x00,0xdb] |