diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-07-02 14:56:45 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-07-02 14:56:45 +0000 |
commit | 9188443a2d35352c4e8a2cffd1b4d31d47843b26 (patch) | |
tree | 980fdaf6bdacd1e193a723d27be6d21a03eddc4e /test/MC/SystemZ | |
parent | 850ba41ed4252aae61e62140cdf0c61dbb444563 (diff) | |
download | llvm-9188443a2d35352c4e8a2cffd1b4d31d47843b26.tar.gz llvm-9188443a2d35352c4e8a2cffd1b4d31d47843b26.tar.bz2 llvm-9188443a2d35352c4e8a2cffd1b4d31d47843b26.tar.xz |
[SystemZ] Add the MVC instruction
This is the first use of D(L,B) addressing, which required a fair bit
of surgery. For that reason, the patch just adds the instruction
definition and the associated assembler and disassembler support.
A later patch will actually make use of it for codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/SystemZ')
-rw-r--r-- | test/MC/SystemZ/insn-bad.s | 44 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-good.s | 26 | ||||
-rw-r--r-- | test/MC/SystemZ/tokens.s | 15 |
3 files changed, 82 insertions, 3 deletions
diff --git a/test/MC/SystemZ/insn-bad.s b/test/MC/SystemZ/insn-bad.s index 8dbe718371..24c77477e4 100644 --- a/test/MC/SystemZ/insn-bad.s +++ b/test/MC/SystemZ/insn-bad.s @@ -1730,6 +1730,50 @@ msy %r0, -524289 msy %r0, 524288 +#CHECK: error: missing length in address +#CHECK: mvc 0, 0 +#CHECK: error: missing length in address +#CHECK: mvc 0(%r1), 0(%r1) +#CHECK: error: invalid use of length addressing +#CHECK: mvc 0(1,%r1), 0(2,%r1) +#CHECK: error: invalid operand +#CHECK: mvc 0(0,%r1), 0(%r1) +#CHECK: error: invalid operand +#CHECK: mvc 0(257,%r1), 0(%r1) +#CHECK: error: invalid operand +#CHECK: mvc -1(1,%r1), 0(%r1) +#CHECK: error: invalid operand +#CHECK: mvc 4096(1,%r1), 0(%r1) +#CHECK: error: invalid operand +#CHECK: mvc 0(1,%r1), -1(%r1) +#CHECK: error: invalid operand +#CHECK: mvc 0(1,%r1), 4096(%r1) +#CHECK: error: %r0 used in an address +#CHECK: mvc 0(1,%r0), 0(%r1) +#CHECK: error: %r0 used in an address +#CHECK: mvc 0(1,%r1), 0(%r0) +#CHECK: error: invalid use of indexed addressing +#CHECK: mvc 0(%r1,%r2), 0(%r1) +#CHECK: error: invalid use of indexed addressing +#CHECK: mvc 0(1,%r2), 0(%r1,%r2) +#CHECK: error: unknown token in expression +#CHECK: mvc 0(-), 0 + + mvc 0, 0 + mvc 0(%r1), 0(%r1) + mvc 0(1,%r1), 0(2,%r1) + mvc 0(0,%r1), 0(%r1) + mvc 0(257,%r1), 0(%r1) + mvc -1(1,%r1), 0(%r1) + mvc 4096(1,%r1), 0(%r1) + mvc 0(1,%r1), -1(%r1) + mvc 0(1,%r1), 4096(%r1) + mvc 0(1,%r0), 0(%r1) + mvc 0(1,%r1), 0(%r0) + mvc 0(%r1,%r2), 0(%r1) + mvc 0(1,%r2), 0(%r1,%r2) + mvc 0(-), 0 + #CHECK: error: invalid operand #CHECK: mvghi -1, 0 #CHECK: error: invalid operand diff --git a/test/MC/SystemZ/insn-good.s b/test/MC/SystemZ/insn-good.s index 17af858dab..2309dfb903 100644 --- a/test/MC/SystemZ/insn-good.s +++ b/test/MC/SystemZ/insn-good.s @@ -5313,6 +5313,32 @@ msy %r0, 524287(%r15,%r1) msy %r15, 0 +#CHECK: mvc 0(1), 0 # encoding: [0xd2,0x00,0x00,0x00,0x00,0x00] +#CHECK: mvc 0(1), 0(%r1) # encoding: [0xd2,0x00,0x00,0x00,0x10,0x00] +#CHECK: mvc 0(1), 0(%r15) # encoding: [0xd2,0x00,0x00,0x00,0xf0,0x00] +#CHECK: mvc 0(1), 4095 # encoding: [0xd2,0x00,0x00,0x00,0x0f,0xff] +#CHECK: mvc 0(1), 4095(%r1) # encoding: [0xd2,0x00,0x00,0x00,0x1f,0xff] +#CHECK: mvc 0(1), 4095(%r15) # encoding: [0xd2,0x00,0x00,0x00,0xff,0xff] +#CHECK: mvc 0(1,%r1), 0 # encoding: [0xd2,0x00,0x10,0x00,0x00,0x00] +#CHECK: mvc 0(1,%r15), 0 # encoding: [0xd2,0x00,0xf0,0x00,0x00,0x00] +#CHECK: mvc 4095(1,%r1), 0 # encoding: [0xd2,0x00,0x1f,0xff,0x00,0x00] +#CHECK: mvc 4095(1,%r15), 0 # encoding: [0xd2,0x00,0xff,0xff,0x00,0x00] +#CHECK: mvc 0(256,%r1), 0 # encoding: [0xd2,0xff,0x10,0x00,0x00,0x00] +#CHECK: mvc 0(256,%r15), 0 # encoding: [0xd2,0xff,0xf0,0x00,0x00,0x00] + + mvc 0(1), 0 + mvc 0(1), 0(%r1) + mvc 0(1), 0(%r15) + mvc 0(1), 4095 + mvc 0(1), 4095(%r1) + mvc 0(1), 4095(%r15) + mvc 0(1,%r1), 0 + mvc 0(1,%r15), 0 + mvc 4095(1,%r1), 0 + mvc 4095(1,%r15), 0 + mvc 0(256,%r1), 0 + mvc 0(256,%r15), 0 + #CHECK: mvghi 0, 0 # encoding: [0xe5,0x48,0x00,0x00,0x00,0x00] #CHECK: mvghi 4095, 0 # encoding: [0xe5,0x48,0x0f,0xff,0x00,0x00] #CHECK: mvghi 0, -32768 # encoding: [0xe5,0x48,0x00,0x00,0x80,0x00] diff --git a/test/MC/SystemZ/tokens.s b/test/MC/SystemZ/tokens.s index 07b29d8ade..2719752b73 100644 --- a/test/MC/SystemZ/tokens.s +++ b/test/MC/SystemZ/tokens.s @@ -3,10 +3,16 @@ #CHECK: error: invalid instruction #CHECK: foo 100, 200 -#CHECK: error: register expected +#CHECK: error: unknown token in expression #CHECK: foo 100(, 200 +#CHECK: error: invalid instruction +#CHECK: foo 100(200), 300 #CHECK: error: register expected -#CHECK: foo 100(0), 200 +#CHECK: foo 100(200,), 300 +#CHECK: error: %r0 used in an address +#CHECK: foo 100(200,%r0), 300 +#CHECK: error: invalid instruction +#CHECK: foo 100(200,%r1), 300 #CHECK: error: invalid operand #CHECK: foo 100(%a0), 200 #CHECK: error: %r0 used in an address @@ -48,7 +54,10 @@ foo 100, 200 foo 100(, 200 - foo 100(0), 200 + foo 100(200), 300 + foo 100(200,), 300 + foo 100(200,%r0), 300 + foo 100(200,%r1), 300 foo 100(%a0), 200 foo 100(%r0), 200 foo 100(%r1,%a0), 200 |