2011-08-16 21:34:08 +00:00
|
|
|
@ RUN: llvm-mc -triple=thumbv6-apple-darwin -show-encoding < %s | FileCheck %s
|
|
|
|
.syntax unified
|
|
|
|
.globl _func
|
|
|
|
|
|
|
|
@ Check that the assembler can handle the documented syntax from the ARM ARM.
|
|
|
|
@ For complex constructs like shifter operands, check more thoroughly for them
|
|
|
|
@ once then spot check that following instructions accept the form generally.
|
|
|
|
@ This gives us good coverage while keeping the overall size of the test
|
|
|
|
@ more reasonable.
|
|
|
|
|
|
|
|
_func:
|
|
|
|
@ CHECK: _func
|
|
|
|
|
2011-08-16 23:57:34 +00:00
|
|
|
@------------------------------------------------------------------------------
|
|
|
|
@ ADD (immediate)
|
|
|
|
@------------------------------------------------------------------------------
|
|
|
|
adds r1, r2, #3
|
|
|
|
adds r2, #3
|
|
|
|
adds r2, #8
|
|
|
|
|
|
|
|
@ CHECK: adds r1, r2, #3 @ encoding: [0xd1,0x1c]
|
|
|
|
@ CHECK: adds r2, r2, #3 @ encoding: [0xd2,0x1c]
|
|
|
|
@ CHECK: adds r2, #8 @ encoding: [0x08,0x32]
|
|
|
|
|
|
|
|
|
2011-08-16 21:34:08 +00:00
|
|
|
@------------------------------------------------------------------------------
|
|
|
|
@ ADD (register)
|
|
|
|
@------------------------------------------------------------------------------
|
|
|
|
adds r1, r2, r3
|
|
|
|
add r2, r8
|
|
|
|
|
|
|
|
@ CHECK: adds r1, r2, r3 @ encoding: [0xd1,0x18]
|
2011-08-17 17:46:01 +00:00
|
|
|
@ CHECK: add r2, r8 @ encoding: [0x42,0x44]
|