xref: /aosp_15_r20/external/llvm/test/MC/X86/inline-asm-obj.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -o - | llvm-mc -triple=x86_64-pc-linux -o %t1 -filetype=obj
2*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -o %t2 -filetype=obj
3*9880d681SAndroid Build Coastguard Worker; RUN: cmp %t1 %t2
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker; Test that we can handle inline assembly referring to a temporary label.
6*9880d681SAndroid Build Coastguard Worker; We crashed when using direct object emission in the past.
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-unknown-linux-gnu"
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Workerdefine void @fj()  {
11*9880d681SAndroid Build Coastguard Worker  call void asm "bsr $0,%eax", "o"(i32 1)
12*9880d681SAndroid Build Coastguard Worker  ret void
13*9880d681SAndroid Build Coastguard Worker}
14