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 4 5 .code 16 6 add.w r0, r0, r1 7 @ CHECK: add.w r0, r0, r1 @ encoding: [0x00,0xeb,0x01,0x00] 8 9 .code 32 10 add r0, r0, r1 11 @ CHECK: add r0, r0, r1 @ encoding: [0x01,0x00,0x80,0xe0] 12 13 .code 16 14 adds r0, r0, r1 15 @ CHECK: adds r0, r0, r1 @ encoding: [0x40,0x18] 16 17 .arm 18 add r0, r0, r1 19 @ CHECK: add r0, r0, r1 @ encoding: [0x01,0x00,0x80,0xe0] 20 21 .thumb 22 add.w r0, r0, r1 23 adds r0, r0, r1 24 25 @ CHECK: add.w r0, r0, r1 @ encoding: [0x00,0xeb,0x01,0x00] 26 @ CHECK: adds r0, r0, r1 @ encoding: [0x40,0x18] 27