diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-05 11:07:38 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-05 11:07:38 +0000 |
commit | ccdf5cc7bc443726425dd1ad498d44768332d49c (patch) | |
tree | ba6ba8530fea0b0d41dff8638f24d06bd3997035 /test | |
parent | 9b05c709c65ba05645853ca49bc2a1ea8b554f37 (diff) | |
download | external_llvm-ccdf5cc7bc443726425dd1ad498d44768332d49c.zip external_llvm-ccdf5cc7bc443726425dd1ad498d44768332d49c.tar.gz external_llvm-ccdf5cc7bc443726425dd1ad498d44768332d49c.tar.bz2 |
[SystemZ] Add definitions for BRCT and BRCTG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/MC/Disassembler/SystemZ/insns-pcrel.txt | 32 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-bad.s | 28 | ||||
-rw-r--r-- | test/MC/SystemZ/insn-good.s | 32 |
3 files changed, 92 insertions, 0 deletions
diff --git a/test/MC/Disassembler/SystemZ/insns-pcrel.txt b/test/MC/Disassembler/SystemZ/insns-pcrel.txt index f9e7774..c565b6e 100644 --- a/test/MC/Disassembler/SystemZ/insns-pcrel.txt +++ b/test/MC/Disassembler/SystemZ/insns-pcrel.txt @@ -1298,3 +1298,35 @@ # 0x0000075a: # CHECK: cij %r0, 0, 15, 0x75a 0xec 0x0f 0x00 0x00 0x00 0x7e + +# 0x00000760: +# CHECK: brct %r0, 0x760 +0xa7 0x06 0x00 0x00 + +# 0x00000764: +# CHECK: brct %r1, 0x762 +0xa7 0x16 0xff 0xff + +# 0x00000768: +# CHECK: brct %r9, 0xffffffffffff0768 +0xa7 0x96 0x80 0x00 + +# 0x0000076c: +# CHECK: brct %r15, 0x1076a +0xa7 0xf6 0x7f 0xff + +# 0x00000770: +# CHECK: brctg %r0, 0x770 +0xa7 0x07 0x00 0x00 + +# 0x00000774: +# CHECK: brctg %r1, 0x772 +0xa7 0x17 0xff 0xff + +# 0x00000778: +# CHECK: brctg %r9, 0xffffffffffff0778 +0xa7 0x97 0x80 0x00 + +# 0x0000077c: +# CHECK: brctg %r15, 0x1077a +0xa7 0xf7 0x7f 0xff diff --git a/test/MC/SystemZ/insn-bad.s b/test/MC/SystemZ/insn-bad.s index a3218ed..246f5ce 100644 --- a/test/MC/SystemZ/insn-bad.s +++ b/test/MC/SystemZ/insn-bad.s @@ -329,6 +329,34 @@ brcl -1, bar brcl 16, bar +#CHECK: error: offset out of range +#CHECK: brct %r0, -0x100002 +#CHECK: error: offset out of range +#CHECK: brct %r0, -1 +#CHECK: error: offset out of range +#CHECK: brct %r0, 1 +#CHECK: error: offset out of range +#CHECK: brct %r0, 0x10000 + + brct %r0, -0x100002 + brct %r0, -1 + brct %r0, 1 + brct %r0, 0x10000 + +#CHECK: error: offset out of range +#CHECK: brctg %r0, -0x100002 +#CHECK: error: offset out of range +#CHECK: brctg %r0, -1 +#CHECK: error: offset out of range +#CHECK: brctg %r0, 1 +#CHECK: error: offset out of range +#CHECK: brctg %r0, 0x10000 + + brctg %r0, -0x100002 + brctg %r0, -1 + brctg %r0, 1 + brctg %r0, 0x10000 + #CHECK: error: invalid operand #CHECK: c %r0, -1 #CHECK: error: invalid operand diff --git a/test/MC/SystemZ/insn-good.s b/test/MC/SystemZ/insn-good.s index 5ddae83..7686238 100644 --- a/test/MC/SystemZ/insn-good.s +++ b/test/MC/SystemZ/insn-good.s @@ -1122,6 +1122,38 @@ #CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL jg bar@PLT +#CHECK: brct %r0, .[[LAB:L.*]]-65536 # encoding: [0xa7,0x06,A,A] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]-65536)+2, kind: FK_390_PC16DBL + brct %r0, -0x10000 +#CHECK: brct %r0, .[[LAB:L.*]]-2 # encoding: [0xa7,0x06,A,A] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]-2)+2, kind: FK_390_PC16DBL + brct %r0, -2 +#CHECK: brct %r0, .[[LAB:L.*]] # encoding: [0xa7,0x06,A,A] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL + brct %r0, 0 +#CHECK: brct %r0, .[[LAB:L.*]]+65534 # encoding: [0xa7,0x06,A,A] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]+65534)+2, kind: FK_390_PC16DBL + brct %r0, 0xfffe +#CHECK: brct %r15, .[[LAB:L.*]] # encoding: [0xa7,0xf6,A,A] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL + brct %r15, 0 + +#CHECK: brctg %r0, .[[LAB:L.*]]-65536 # encoding: [0xa7,0x07,A,A] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]-65536)+2, kind: FK_390_PC16DBL + brctg %r0, -0x10000 +#CHECK: brctg %r0, .[[LAB:L.*]]-2 # encoding: [0xa7,0x07,A,A] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]-2)+2, kind: FK_390_PC16DBL + brctg %r0, -2 +#CHECK: brctg %r0, .[[LAB:L.*]] # encoding: [0xa7,0x07,A,A] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL + brctg %r0, 0 +#CHECK: brctg %r0, .[[LAB:L.*]]+65534 # encoding: [0xa7,0x07,A,A] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]+65534)+2, kind: FK_390_PC16DBL + brctg %r0, 0xfffe +#CHECK: brctg %r15, .[[LAB:L.*]] # encoding: [0xa7,0xf7,A,A] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL + brctg %r15, 0 + #CHECK: c %r0, 0 # encoding: [0x59,0x00,0x00,0x00] #CHECK: c %r0, 4095 # encoding: [0x59,0x00,0x0f,0xff] #CHECK: c %r0, 0(%r1) # encoding: [0x59,0x00,0x10,0x00] |