1*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple=thumbv7-apple-darwin -filetype=obj -o - < %s | llvm-readobj -s -sd | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker.thumb 3*9880d681SAndroid Build Coastguard Worker.thumb_func t 4*9880d681SAndroid Build Coastguard Workert: nop 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker.data 7*9880d681SAndroid Build Coastguard Worker.space 4441096 - 4 - 2 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker.section __TEXT, __branch, regular, pure_instructions 10*9880d681SAndroid Build Coastguard Worker.thumb 11*9880d681SAndroid Build Coastguard Worker.thumb_func b 12*9880d681SAndroid Build Coastguard Workerb: 13*9880d681SAndroid Build Coastguard Worker bl t 14*9880d681SAndroid Build Coastguard Worker# We are checking that the branch and link instruction which is: 15*9880d681SAndroid Build Coastguard Worker# bl #-4441096 16*9880d681SAndroid Build Coastguard Worker# has it displacement encoded correctly with respect to the J1 and J2 bits when 17*9880d681SAndroid Build Coastguard Worker# the branch is assembled with a label not a displacement. 18*9880d681SAndroid Build Coastguard Worker# rdar://10149689 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Worker# CHECK: Section { 21*9880d681SAndroid Build Coastguard Worker# CHECK: Index: 2 22*9880d681SAndroid Build Coastguard Worker# CHECK: Name: __branch (5F 5F 62 72 61 6E 63 68 00 00 00 00 00 00 00 00) 23*9880d681SAndroid Build Coastguard Worker# CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00) 24*9880d681SAndroid Build Coastguard Worker# CHECK: SectionData ( 25*9880d681SAndroid Build Coastguard Worker# CHECK: 0000: C3F7FCF5 |....| 26*9880d681SAndroid Build Coastguard Worker# CHECK: ) 27*9880d681SAndroid Build Coastguard Worker# CHECK: } 28