mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
23091659f3
Currently the assembler would accept, e.g. `ldr r0, [s0, #12]` and similar. This patch add checks that only general-purpose registers are used in address operands, shifted registers, and shift amounts. Differential revision: https://reviews.llvm.org/D39910 llvm-svn: 321866
51 lines
1.9 KiB
ArmAsm
51 lines
1.9 KiB
ArmAsm
@ RUN: not llvm-mc -triple=armv7a-eabi < %s 2>&1 | FileCheck %s
|
|
|
|
ldr r4, [s1, #12]
|
|
@ CHECK: [[@LINE-1]]{{.*}}error: invalid operand for instruction
|
|
|
|
ldr r4, [d2, #12]
|
|
@ CHECK: [[@LINE-1]]{{.*}}error: invalid operand for instruction
|
|
|
|
ldr r4, [q3, #12]
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldr r4, [cpsr, #12]
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldr r4, [r1, s12]
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldr r4, [r1, d12]
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldr r4, [r1, q12]
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldr r4, [r1, cpsr]
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldr r4, [r3], s12
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldr r4, [r3], d12
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldr r4, [r3], q12
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldr r4, [r3], cpsr
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
add r3, r0, s1, lsl #2
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
add r3, r0, d1, lsl #2
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
add r3, r0, q1, lsl #2
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
add r3, r0, cpsr, lsl #2
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
add r3, r0, r1, lsl s6
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
add r3, r0, r1, lsl d6
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
add r3, r0, r1, lsl q6
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
add r3, r0, r1, lsl cpsr
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldrd r2, r3, [s4]
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldrd r2, r3, [r4, s5]
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|
|
ldrd r2, r3, [r4], s5
|
|
@ CHECK: [[@LINE-1]]{{.*}} invalid operand for instruction
|