[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / ARM / mode-switch.s
blobafcc082ba60d5f29a66f0c47cca2cc31f1ffa809
1 @ Test ARM / Thumb mode switching with .code
2 @ RUN: llvm-mc -triple armv7-unknown-unknown -show-encoding < %s | FileCheck %s
3 @ RUN: llvm-mc -triple thumbv7-unknown-unknown -show-encoding <%s | FileCheck %s
5 .code 16
6 add.w r0, r0, r1
7 @ CHECK: add.w r0, r0, r1 @ encoding: [0x00,0xeb,0x01,0x00]
9 .code 32
10 add r0, r0, r1
11 @ CHECK: add r0, r0, r1 @ encoding: [0x01,0x00,0x80,0xe0]
13 .code 16
14 adds r0, r0, r1
15 @ CHECK: adds r0, r0, r1 @ encoding: [0x40,0x18]
17 .arm
18 add r0, r0, r1
19 @ CHECK: add r0, r0, r1 @ encoding: [0x01,0x00,0x80,0xe0]
21 .thumb
22 add.w r0, r0, r1
23 adds r0, r0, r1
25 @ CHECK: add.w r0, r0, r1 @ encoding: [0x00,0xeb,0x01,0x00]
26 @ CHECK: adds r0, r0, r1 @ encoding: [0x40,0x18]