42 lines · plain
1; Check how tricky symbols are printed in the asm output.2; RUN: llc -mtriple=i686-pc-win32 %s -o - | FileCheck %s --check-prefix=ASM3; RUN: llc -mtriple=i686-pc-win32 %s -x86-asm-syntax=intel -o - | FileCheck %s --check-prefix=ASM4 5; Check that we can roundtrip these names through our assembler,6; in both at&t and intel syntax.7; RUN: llc -mtriple=i686-pc-win32 %s -o - | llvm-mc -triple i686-pc-win32 -filetype=obj | llvm-readobj --symbols - | FileCheck %s --check-prefix=READOBJ8; RUN: llc -mtriple=i686-pc-win32 -x86-asm-syntax=intel %s -o - | llvm-mc -triple i686-pc-win32 -filetype=obj | llvm-readobj --symbols - | FileCheck %s --check-prefix=READOBJ9 10 11@"\01??__E_Generic_object@?$_Error_objects@H@std@@YAXXZ" = global i32 012@"\01__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4" = global i32 013@"\01@foo.bar" = global i32 014 15define weak i32 @"\01??_B?$num_put@_WV?$back_insert_iterator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@std@@@std@@51"() section ".text" {16 %a = load i32, ptr @"\01??__E_Generic_object@?$_Error_objects@H@std@@YAXXZ"17 %b = load i32, ptr @"\01__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4"18 %c = load i32, ptr @"\01@foo.bar"19 %x = add i32 %a, %b20 %y = add i32 %x, %c21 ret i32 %y22}23 24; Check that these symbols are not quoted. They occur in output that gets passed to GAS.25; ASM: .globl __ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@426; ASM-NOT: .globl "__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4"27; ASM: .globl @foo.bar28; ASM-NOT: .globl "@foo.bar"29 30; READOBJ: Symbol31; READOBJ: Name: .text32; READOBJ: Section: .text33; READOBJ: Symbol34; READOBJ: Name: ??_B?$num_put@_WV?$back_insert_iterator@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@std@@@std@@5135; READOBJ: Section: .text36; READOBJ: Symbol37; READOBJ: Name: ??__E_Generic_object@?$_Error_objects@H@std@@YAXXZ38; READOBJ: Symbol39; READOBJ: Name: __ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@440; READOBJ: Symbol41; READOBJ: Name: @foo.bar42