Thumb2 parsing and encoding for IT blocks.
[oota-llvm.git] / test / MC / ARM / basic-thumb2-instructions.s
1 @ RUN: llvm-mc -triple=thumbv7-apple-darwin -show-encoding < %s | FileCheck %s
2   .syntax unified
3   .globl _func
4
5 @ Check that the assembler can handle the documented syntax from the ARM ARM.
6 @ For complex constructs like shifter operands, check more thoroughly for them
7 @ once then spot check that following instructions accept the form generally.
8 @ This gives us good coverage while keeping the overall size of the test
9 @ more reasonable.
10
11
12 @ FIXME: Some 3-operand instructions have a 2-operand assembly syntax.
13
14 _func:
15 @ CHECK: _func
16
17 @------------------------------------------------------------------------------
18 @ IT
19 @------------------------------------------------------------------------------
20 @ Test encodings of a few full IT blocks, not just the IT instruction
21
22         iteet eq
23         addeq r0, r1, r2
24         nopne
25         subne r5, r6, r7
26         addeq r1, r2, #4
27
28 @ CHECK: iteet  eq                      @ encoding: [0x0d,0xbf]
29 @ CHECK: addeq  r0, r1, r2              @ encoding: [0x88,0x18]
30 @ CHECK: nopne                          @ encoding: [0x00,0xbf]
31 @ CHECK: subne  r5, r6, r7              @ encoding: [0xf5,0x1b]
32 @ CHECK: addeq  r1, r2, #4              @ encoding: [0x11,0x1d]