From f18544d1e55f6e8e3929c1bb840d8fb8709064d0 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 14 Sep 2011 23:29:05 +0000 Subject: [PATCH] Thumb2 assembly parsing and encoding for PLI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139757 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/ARM/basic-thumb2-instructions.s | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/test/MC/ARM/basic-thumb2-instructions.s b/test/MC/ARM/basic-thumb2-instructions.s index 166db88a8ad..63f7f37423e 100644 --- a/test/MC/ARM/basic-thumb2-instructions.s +++ b/test/MC/ARM/basic-thumb2-instructions.s @@ -1283,6 +1283,50 @@ _func: @ CHECK: pld [sp, r2, lsl #1] @ encoding: [0x1d,0xf8,0x12,0xf0] @ CHECK: pld [sp, r2] @ encoding: [0x1d,0xf8,0x02,0xf0] +@------------------------------------------------------------------------------ +@ PLI(immediate) +@------------------------------------------------------------------------------ + pli [r5, #-4] + pli [r6, #32] + pli [r6, #33] + pli [r6, #257] + pli [r7, #257] + +@ CHECK: pli [r5, #-4] @ encoding: [0x15,0xf9,0x04,0xfc] +@ CHECK: pli [r6, #32] @ encoding: [0x96,0xf9,0x20,0xf0] +@ CHECK: pli [r6, #33] @ encoding: [0x96,0xf9,0x21,0xf0] +@ CHECK: pli [r6, #257] @ encoding: [0x96,0xf9,0x01,0xf1] +@ CHECK: pli [r7, #257] @ encoding: [0x97,0xf9,0x01,0xf1] + + +@------------------------------------------------------------------------------ +@ PLI(literal) +@------------------------------------------------------------------------------ + pli _foo + + +@ CHECK: pli _foo @ encoding: [0x9f'A',0xf9'A',A,0xf0'A'] + @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12 + + +@------------------------------------------------------------------------------ +@ PLI(register) +@------------------------------------------------------------------------------ + pli [r8, r1] + pli [r5, r2] + pli [r0, r2, lsl #3] + pli [r8, r2, lsl #2] + pli [sp, r2, lsl #1] + pli [sp, r2, lsl #0] + +@ CHECK: pli [r8, r1] @ encoding: [0x18,0xf9,0x01,0xf0] +@ CHECK: pli [r5, r2] @ encoding: [0x15,0xf9,0x02,0xf0] +@ CHECK: pli [r0, r2, lsl #3] @ encoding: [0x10,0xf9,0x32,0xf0] +@ CHECK: pli [r8, r2, lsl #2] @ encoding: [0x18,0xf9,0x22,0xf0] +@ CHECK: pli [sp, r2, lsl #1] @ encoding: [0x1d,0xf9,0x12,0xf0] +@ CHECK: pli [sp, r2] @ encoding: [0x1d,0xf9,0x02,0xf0] + + @------------------------------------------------------------------------------ @ IT @------------------------------------------------------------------------------