1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 16:33:37 +01:00
llvm-mirror/test/MC/Disassembler/ARM/thumb1.txt
2011-08-22 18:05:49 +00:00

287 lines
7.3 KiB
Plaintext

# RUN: llvm-mc -triple=thumbv6-apple-darwin -disassemble < %s | FileCheck %s
#------------------------------------------------------------------------------
# ADC (register)
#------------------------------------------------------------------------------
# CHECK: adcs r4, r6
0x74 0x41
#------------------------------------------------------------------------------
# ADD (immediate)
#------------------------------------------------------------------------------
# CHECK: adds r1, r2, #3
# CHECK: adds r2, r2, #3
# CHECK: adds r2, #8
0xd1 0x1c
0xd2 0x1c
0x08 0x32
#------------------------------------------------------------------------------
# ADD (register)
#------------------------------------------------------------------------------
# CHECK: adds r1, r2, r3
# CHECK: add r2, r8
0xd1 0x18
0x42 0x44
#------------------------------------------------------------------------------
# ASR (immediate)
#------------------------------------------------------------------------------
# CHECK: asrs r2, r3, #32
# CHECK: asrs r2, r3, #5
# CHECK: asrs r2, r3, #1
0x1a 0x10
0x5a 0x11
0x5a 0x10
#------------------------------------------------------------------------------
# ASR (register)
#------------------------------------------------------------------------------
# CHECK: asrs r5, r2
0x15 0x41
#------------------------------------------------------------------------------
# BICS
#------------------------------------------------------------------------------
# CHECK: bics r1, r6
0xb1 0x43
#------------------------------------------------------------------------------
# BKPT
#------------------------------------------------------------------------------
# CHECK: bkpt #0
# CHECK: bkpt #255
0x00 0xbe
0xff 0xbe
#------------------------------------------------------------------------------
# BLX (register)
#------------------------------------------------------------------------------
# CHECK: blx r4
0xa0 0x47
#------------------------------------------------------------------------------
# BX
#------------------------------------------------------------------------------
# CHECK: bx r2
0x10 0x47
#------------------------------------------------------------------------------
# CMN
#------------------------------------------------------------------------------
# CHECK: cmn r5, r1
0xcd 0x42
#------------------------------------------------------------------------------
# CMP
#------------------------------------------------------------------------------
# CHECK: cmp r6, #32
# CHECK: cmp r3, r4
# CHECK: cmp r8, r1
0x20 0x2e
0xa3 0x42
0x88 0x45
#------------------------------------------------------------------------------
# EOR
#------------------------------------------------------------------------------
# CHECK: eors r4, r5
0x6c 0x40
#------------------------------------------------------------------------------
# LDM
#------------------------------------------------------------------------------
# CHECK: ldm r3, {r0, r1, r2, r3, r4, r5, r6, r7}
# CHECK: ldm r2!, {r1, r3, r4, r5, r7}
# CHECK: ldm r1, {r1}
0xff 0xcb
0xba 0xca
0x02 0xc9
#------------------------------------------------------------------------------
# LDR (immediate)
#------------------------------------------------------------------------------
# CHECK: ldr r1, [r5]
# CHECK: ldr r2, [r6, #32]
# CHECK: ldr r3, [r7, #124]
# CHECK: ldr r1, [sp]
# CHECK: ldr r2, [sp, #24]
# CHECK: ldr r3, [sp, #1020]
0x29 0x68
0x32 0x6a
0xfb 0x6f
0x00 0x99
0x06 0x9a
0xff 0x9b
#------------------------------------------------------------------------------
# LDR (register)
#------------------------------------------------------------------------------
# CHECK: ldr r1, [r2, r3]
0xd1 0x58
#------------------------------------------------------------------------------
# LDRB (immediate)
#------------------------------------------------------------------------------
# CHECK: ldrb r4, [r3]
# CHECK: ldrb r5, [r6]
# CHECK: ldrb r6, [r7, #31]
0x1c 0x78
0x35 0x78
0xfe 0x7f
#------------------------------------------------------------------------------
# LDRB (register)
#------------------------------------------------------------------------------
# CHECK: ldrb r6, [r4, r5]
0x66 0x5d
#------------------------------------------------------------------------------
# LDRH (immediate)
#------------------------------------------------------------------------------
# CHECK: ldrh r3, [r3]
# CHECK: ldrh r4, [r6, #2]
# CHECK: ldrh r5, [r7, #62]
0x1b 0x88
0x74 0x88
0xfd 0x8f
#------------------------------------------------------------------------------
# LDRH (register)
#------------------------------------------------------------------------------
# CHECK: ldrh r6, [r2, r6]
0x96 0x5b
#------------------------------------------------------------------------------
# LDRSB/LDRSH
#------------------------------------------------------------------------------
# CHECK: ldrsb r6, [r2, r6]
# CHECK: ldrsh r3, [r7, r1]
0x96 0x57
0x7b 0x5e
#------------------------------------------------------------------------------
# LSL (immediate)
#------------------------------------------------------------------------------
# CHECK: movs r4, r5
# CHECK: lsls r4, r5, #4
0x2c 0x00
0x2c 0x01
#------------------------------------------------------------------------------
# LSL (register)
#------------------------------------------------------------------------------
# CHECK: lsls r2, r6
0xb2 0x40
#------------------------------------------------------------------------------
# LSR (immediate)
#------------------------------------------------------------------------------
# CHECK: lsrs r1, r3, #1
# CHECK: lsrs r1, r3, #32
0x59 0x08
0x19 0x08
#------------------------------------------------------------------------------
# LSR (register)
#------------------------------------------------------------------------------
# CHECK: lsrs r2, r6
0xf2 0x40
#------------------------------------------------------------------------------
# MOV (immediate)
#------------------------------------------------------------------------------
# CHECK: movs r2, #0
# CHECK: movs r2, #255
# CHECK: movs r2, #23
0x00 0x22
0xff 0x22
0x17 0x22
#------------------------------------------------------------------------------
# MOV (register)
#------------------------------------------------------------------------------
# CHECK: mov r3, r4
# CHECK: movs r1, r3
0x23 0x46
0x19 0x00
#------------------------------------------------------------------------------
# MUL
#------------------------------------------------------------------------------
# CHECK: muls r1, r2, r1
# CHECK: muls r3, r4
0x51 0x43
0x63 0x43
#------------------------------------------------------------------------------
# MVN
#------------------------------------------------------------------------------
# CHECK: mvns r6, r3
0xde 0x43
#------------------------------------------------------------------------------
# NEG
#------------------------------------------------------------------------------
# CHECK: rsbs r3, r4, #0
0x63 0x42
#------------------------------------------------------------------------------
# NOP
#------------------------------------------------------------------------------
# CHECK: nop
0xc0 0x46
#------------------------------------------------------------------------------
# ORR
#------------------------------------------------------------------------------
# CHECK: orrs r3, r4
0x23 0x43