56 lines · plain
1@RUN: llvm-mc -triple armv7-base-apple-darwin %s | FileCheck --check-prefix=CHECK %s2@RUN: llvm-mc -triple thumbv7-base-apple-darwin %s | FileCheck --check-prefix=CHECK %s3 4@5@ Check that ldr to constant pool correctly transfers the condition codes6@7@ simple test8.section __TEXT,a,regular,pure_instructions9@ CHECK-LABEL: f0:10f0:11 it eq12 ldreq r0, =0x1000213@ CHECK: ldreq r0, Ltmp014 15@ loading multiple constants16.section __TEXT,b,regular,pure_instructions17@ CHECK-LABEL: f1:18f1:19 ite eq20 ldreq r0, =0x1000321@ CHECK: ldreq r0, Ltmp122 ldrne r0, =0x1000423@ CHECK: ldrne r0, Ltmp224 25@ transformation to mov26.section __TEXT,d,regular,pure_instructions27@ 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 __TEXT,a,regular,pure_instructions46@ CHECK: .p2align 247@ CHECK: Ltmp0:48@ CHECK: .long 6553849 50@ CHECK: .section __TEXT,b,regular,pure_instructions51@ CHECK: .p2align 252@ CHECK: Ltmp1:53@ CHECK: .long 6553954@ CHECK: Ltmp2:55@ CHECK: .long 6554056