56 lines · plain
1@RUN: llvm-mc -triple armv7-unknown-linux-gnueabi %s | FileCheck --check-prefix=CHECK %s2@RUN: llvm-mc -triple thumbv7-unknown-linux-gnueabi %s | FileCheck --check-prefix=CHECK %s3 4@5@ Check that ldr to constant pool correctly transfers the condition codes6@7@ simple test8.section a,"ax",%progbits9@ CHECK-LABEL: f0:10f0:11 it eq12 ldreq r0, =0x1000213@ CHECK: ldreq r0, .Ltmp[[TMP0:[0-9]+]]14 15@ loading multiple constants16.section b,"ax",%progbits17@ CHECK-LABEL: f1:18f1:19 ite eq20 ldreq r0, =0x1000321@ CHECK: ldreq r0, .Ltmp[[TMP1:[0-9]+]]22 ldrne r0, =0x1000423@ CHECK: ldrne r0, .Ltmp[[TMP2:[0-9]+]]24 25@ transformation to mov26.section c, "ax", %progbits27@ CHECK-LABEL: f2:28f2:29@ Can use the narrow Thumb mov as it does not set flags in an IT block30 it eq31 ldreq r1, =0x132@ CHECK: moveq r1, #133 34@ Must use the wide Thumb mov if the constant can't be represented35 ite eq36 ldreq r2, = 0x1f00000037@ CHECK-ARM moveq r2, #52009369638@ CHECK-THUMB2 moveq.w r2, #52009369639 ldrne r3, = 0x0000123440@ CHECK: movwne r3, #466041 42@43@ Constant Pools44@45@ CHECK: .section a,"ax",%progbits46@ CHECK: .p2align 247@ CHECK: .Ltmp[[TMP0]]48@ CHECK: .long 6553849 50@ CHECK: .section b,"ax",%progbits51@ CHECK: .p2align 252@ CHECK: .Ltmp[[TMP1]]53@ CHECK: .long 6553954@ CHECK: .Ltmp[[TMP2]]55@ CHECK: .long 6554056