diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-03-30 23:32:32 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-03-30 23:32:32 +0000 |
commit | 40829ed6f5e449fa33a9cd7022ce6c3941dace3d (patch) | |
tree | ffec1cbac89df78a6802d6b1831745b56ad0e129 /test | |
parent | c0e6d780cd7a0935f545a0ec0a9ad4a6ae8db2a9 (diff) | |
download | llvm-40829ed6f5e449fa33a9cd7022ce6c3941dace3d.tar.gz llvm-40829ed6f5e449fa33a9cd7022ce6c3941dace3d.tar.bz2 llvm-40829ed6f5e449fa33a9cd7022ce6c3941dace3d.tar.xz |
- Implement asm parsing support for LDRT, LDRBT, STRT, STRBT and
{STR,LDC}{2}_PRE.
- Fixed the encoding in some places.
- Some of those instructions were using am2offset and now use addrmode2.
Codegen isn't affected, instructions which use SelectAddrMode2Offset were not
touched.
- Teach printAddrMode2Operand to check by the addressing mode which index
mode to print.
- This is a work in progress, more work to come. The idea is to change places
which use am2offset to use addrmode2 instead, as to unify assembly parser.
- Add testcases for assembly parser
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128585 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/MC/ARM/arm_addrmode2.s | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/MC/ARM/arm_addrmode2.s b/test/MC/ARM/arm_addrmode2.s new file mode 100644 index 0000000000..ca99233b9b --- /dev/null +++ b/test/MC/ARM/arm_addrmode2.s @@ -0,0 +1,34 @@ +@ RUN: llvm-mc -mcpu=cortex-a8 -triple arm-unknown-unknown -show-encoding %s | FileCheck %s + +@ Post-indexed +@ CHECK: ldrt r1, [r0], r2 @ encoding: [0x02,0x10,0xb0,0xe6] +@ CHECK: ldrt r1, [r0], r2, lsr #3 @ encoding: [0xa2,0x11,0xb0,0xe6] +@ CHECK: ldrt r1, [r0], #4 @ encoding: [0x04,0x10,0xb0,0xe4] +@ CHECK: ldrbt r1, [r0], r2 @ encoding: [0x02,0x10,0xf0,0xe6] +@ CHECK: ldrbt r1, [r0], r2, lsr #3 @ encoding: [0xa2,0x11,0xf0,0xe6] +@ CHECK: ldrbt r1, [r0], #4 @ encoding: [0x04,0x10,0xf0,0xe4] +@ CHECK: strt r1, [r0], r2 @ encoding: [0x02,0x10,0xa0,0xe6] +@ CHECK: strt r1, [r0], r2, lsr #3 @ encoding: [0xa2,0x11,0xa0,0xe6] +@ CHECK: strt r1, [r0], #4 @ encoding: [0x04,0x10,0xa0,0xe4] +@ CHECK: strbt r1, [r0], r2 @ encoding: [0x02,0x10,0xe0,0xe6] +@ CHECK: strbt r1, [r0], r2, lsr #3 @ encoding: [0xa2,0x11,0xe0,0xe6] +@ CHECK: strbt r1, [r0], #4 @ encoding: [0x04,0x10,0xe0,0xe4] + ldrt r1, [r0], r2 + ldrt r1, [r0], r2, lsr #3 + ldrt r1, [r0], #4 + ldrbt r1, [r0], r2 + ldrbt r1, [r0], r2, lsr #3 + ldrbt r1, [r0], #4 + strt r1, [r0], r2 + strt r1, [r0], r2, lsr #3 + strt r1, [r0], #4 + strbt r1, [r0], r2 + strbt r1, [r0], r2, lsr #3 + strbt r1, [r0], #4 + +@ Pre-indexed +@ CHECK: ldr r1, [r0, r2, lsr #3]! @ encoding: [0xa2,0x11,0xb0,0xe7] +@ CHECK: ldrb r1, [r0, r2, lsr #3]! @ encoding: [0xa2,0x11,0xf0,0xe7] + ldr r1, [r0, r2, lsr #3]! + ldrb r1, [r0, r2, lsr #3]! + |