Unnamed: 0
int64
0
0
repo_id
stringlengths
5
186
file_path
stringlengths
15
223
content
stringlengths
1
32.8M
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_desc.s
# RUN: llvm-mc -triple i386-apple-darwin9 %s | FileCheck %s # CHECK: TEST0: # CHECK: .desc foo,16 # CHECK: .desc bar,4 TEST0: .desc foo,0x10 .desc bar, 1 +3
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/vararg-default-value.s
// RUN: llvm-mc -triple x86_64-linux-gnu %s | FileCheck %s .macro abc arg:vararg=nop \arg .endm .macro abcd arg0=%eax arg1:vararg=%ebx movl \arg0, \arg1 .endm .text // CHECK: nop abc // CHECK: movl %eax, %ebx abcd ,
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/ifdef.s
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifdef undefined .byte 0 .else .byte 1 .endif defined: # CHECK: .byte 1 # CHECK-NOT: .byte 0 .ifdef defined .byte 1 .else .byte 0 .endif movl %eax, undefined # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifdef undefined .byte 0 .else .byte 1 .endif
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macro-qualifier.s
# RUN: llvm-mc -triple i386 -o - %s | FileCheck %s .macro required parameter:req .long \parameter .endm required 0 # CHECK: .long 0 .macro required_with_default parameter:req=0 .long \parameter .endm required 1 # CHECK: .long 1
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_darwin_section.s
# RUN: llvm-mc -triple i386-apple-darwin9 %s | FileCheck %s # CHECK: .section __DWARF,__debug_frame,regular,debug .section __DWARF,__debug_frame,regular,debug
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_fill.s
# RUN: llvm-mc -triple i386-unknown-unknown %s 2> %t.err | FileCheck %s # RUN: FileCheck --check-prefix=CHECK-WARNINGS %s < %t.err # CHECK: TEST0: # CHECK: .byte 10 TEST0: .fill 1, 1, 10 # CHECK: TEST1: # CHECK: .short 3 # CHECK: .short 3 TEST1: .fill 2, 2, 3 # CHECK: TEST2: # CHECK: .long 4 # CHECK: .long 0 TEST2: .fill 1, 8, 4 # CHECK: TEST3 # CHECK: .byte 0 # CHECK: .byte 0 # CHECK: .byte 0 # CHECK: .byte 0 TEST3: .fill 4 # CHECK: TEST4 # CHECK: .short 0 # CHECK: .short 0 # CHECK: .short 0 # CHECK: .short 0 TEST4: .fill 4, 2 # CHECK: TEST5 # CHECK: .short 2 # CHECK: .byte 0 # CHECK: .short 2 # CHECK: .byte 0 # CHECK: .short 2 # CHECK: .byte 0 # CHECK: .short 2 # CHECK: .byte 0 TEST5: .fill 4, 3, 2 # CHECK: TEST6 # CHECK: .long 2 # CHECK: .long 0 # CHECK-WARNINGS: '.fill' directive with size greater than 8 has been truncated to 8 TEST6: .fill 1, 9, 2 # CHECK: TEST7 # CHECK: .long 0 # CHECK: .long 0 # CHECK-WARNINGS: '.fill' directive pattern has been truncated to 32-bits TEST7: .fill 1, 8, 1<<32 # CHECK-WARNINGS: '.fill' directive with negative repeat count has no effect TEST8: .fill -1, 8, 1 # CHECK-WARNINGS: '.fill' directive with negative size has no effect TEST9: .fill 1, -1, 1 # CHECK: TEST10 # CHECK: .short 22136 # CHECK: .byte 52 TEST10: .fill 1, 3, 0x12345678
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/invalid-input-assertion.s
// RUN: not llvm-mc -triple i686-linux -o /dev/null %s .macro macro parameter=0 .if \parameter .else .endm macro 1
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_set.s
# RUN: llvm-mc -triple i386-unknown-elf %s | FileCheck %s # CHECK: TEST0: # CHECK: a = 0 # CHECK-NOT: .no_dead_strip a TEST0: .set a, 0 # CHECK: TEST1: # CHECK: a = 0 # CHECK-NOT: .no_dead_strip a TEST1: .equ a, 0
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/defsym_error1.s
# RUN: not llvm-mc -filetype=obj -triple=i386-unknown-elf -defsym aaoeuaoeu %s 2>&1 | FileCheck %s # CHECK: defsym must be of the form: sym=value
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macro-irp.s
// RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s .irp reg,%eax,%ebx pushl \reg .endr // CHECK: pushl %eax // CHECK: pushl %ebx
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/expr-shr.s
// RUN: llvm-mc -triple x86_64-unknown-unknown-elf %s | FileCheck %s --check-prefix=CHECK // RUN: llvm-mc -triple x86_64-pc-windows-msvc %s | FileCheck %s --check-prefix=MSVC // RUN: llvm-mc -triple x86_64-unknown-darwin %s | FileCheck %s --check-prefix=DARWIN .data // CHECK: .quad 3 // Both COFF and Darwin still use AShr. // MSVC: .quad -1 // DARWIN: .quad -1 .quad (~0 >> 62)
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/at-pseudo-variable-bad.s
# RUN: not llvm-mc -triple i386-unknown-unknown < %s 2>&1 | FileCheck %s add $1\@, %eax # CHECK: :[[@LINE-1]]:8: error: unexpected token in argument list .macro A @ mov %eax, %eax .endm # CHECK: :[[@LINE-3]]:11: error: expected identifier in '.macro' directive .rept 2 addi $8, $8, \@ .endr # CHECK: error: unknown token in expression # CHECK: :[[@LINE-4]]:1: note: while in macro instantiation # CHECK-NEXT: .rept 2 .rep 3 addi $9, $9, \@ .endr # CHECK: error: unknown token in expression # CHECK: :[[@LINE-4]]:1: note: while in macro instantiation # CHECK-NEXT: .rep 3
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/variables-invalid.s
// RUN: not llvm-mc -triple i386-unknown-unknown %s 2> %t // RUN: FileCheck --input-file %t %s .data // CHECK: Recursive use of 't0_v0' t0_v0 = t0_v0 + 1 t1_v1 = 1 t1_v1 = 2 t2_s0: // CHECK: redefinition of 't2_s0' t2_s0 = 2 t3_s0 = t2_s0 + 1 .long t3_s0 // CHECK: invalid reassignment of non-absolute variable 't3_s0' t3_s0 = 1 // CHECK: Recursive use of 't4_s2' t4_s0 = t4_s1 t4_s1 = t4_s2 t4_s2 = t4_s0 // CHECK: Recursive use of 't5_s1' t5_s0 = t5_s1 + 1 t5_s1 = t5_s0
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/section.s
# RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s # RUN: llvm-readobj -s -sd < %t | FileCheck %s .section test1 .byte 1 .section test2 .byte 2 .previous .byte 1 .section test2 .byte 2 .previous .byte 1 .section test1 .byte 1 .previous .byte 1 .section test2 .byte 2 .pushsection test3 .byte 3 .pushsection test4 .byte 4 .pushsection test5 .byte 5 .popsection .byte 4 .popsection .byte 3 .popsection .byte 2 .pushsection test3 .byte 3 .pushsection test4 .byte 4 .previous .byte 3 .popsection .byte 3 .previous .byte 2 .section test1 .byte 1 .popsection .byte 2 .previous .byte 1 .previous # CHECK: Sections [ # CHECK: Section { # CHECK: Name: test1 # CHECK-NEXT: Type: SHT_PROGBITS # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] # CHECK-NEXT: Address: 0x0 # CHECK-NEXT: Offset: 0x34 # CHECK-NEXT: Size: 7 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 # CHECK-NEXT: AddressAlignment: 1 # CHECK-NEXT: EntrySize: 0 # CHECK-NEXT: SectionData ( # CHECK-NEXT: 0000: 01010101 010101 # CHECK-NEXT: ) # CHECK-NEXT: } # CHECK: Section { # CHECK: Name: test2 # CHECK-NEXT: Type: SHT_PROGBITS # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] # CHECK-NEXT: Address: 0x0 # CHECK-NEXT: Offset: 0x3B # CHECK-NEXT: Size: 6 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 # CHECK-NEXT: AddressAlignment: 1 # CHECK-NEXT: EntrySize: 0 # CHECK-NEXT: SectionData ( # CHECK-NEXT: 0000: 02020202 0202 # CHECK-NEXT: ) # CHECK-NEXT: } # CHECK: Section { # CHECK: Name: test3 # CHECK-NEXT: Type: SHT_PROGBITS # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] # CHECK-NEXT: Address: 0x0 # CHECK-NEXT: Offset: 0x41 # CHECK-NEXT: Size: 5 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 # CHECK-NEXT: AddressAlignment: 1 # CHECK-NEXT: EntrySize: 0 # CHECK-NEXT: SectionData ( # CHECK-NEXT: 0000: 03030303 03 # CHECK-NEXT: ) # CHECK-NEXT: } # CHECK: Section { # CHECK: Name: test4 # CHECK-NEXT: Type: SHT_PROGBITS # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] # CHECK-NEXT: Address: 0x0 # CHECK-NEXT: Offset: 0x46 # CHECK-NEXT: Size: 3 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 # CHECK-NEXT: AddressAlignment: 1 # CHECK-NEXT: EntrySize: 0 # CHECK-NEXT: SectionData ( # CHECK-NEXT: 0000: 040404 # CHECK-NEXT: ) # CHECK-NEXT: } # CHECK: Section { # CHECK: Name: test5 # CHECK-NEXT: Type: SHT_PROGBITS # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] # CHECK-NEXT: Address: 0x0 # CHECK-NEXT: Offset: 0x49 # CHECK-NEXT: Size: 1 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 # CHECK-NEXT: AddressAlignment: 1 # CHECK-NEXT: EntrySize: 0 # CHECK-NEXT: SectionData ( # CHECK-NEXT: 0000: 05 # CHECK-NEXT: ) # CHECK-NEXT: }
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_tlv.s
# RUN: llvm-mc -triple x86_64-unknown-darwin %s | FileCheck %s # CHECK: __DATA,__thread_vars,thread_local_variables # CHECK: .globl _a # CHECK: _a: # CHECK: .quad 0 .tlv .globl _a _a: .quad 0 .quad 0 .quad 0
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/section_names.s
# RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s # RUN: llvm-readobj -s < %t | FileCheck %s .section .nobits .byte 1 .section .nobits2 .byte 1 .section .nobitsfoo .byte 1 .section .init_array .byte 1 .section .init_array2 .byte 1 .section .init_arrayfoo .byte 1 .section .fini_array .byte 1 .section .fini_array2 .byte 1 .section .fini_arrayfoo .byte 1 .section .preinit_array .byte 1 .section .preinit_array2 .byte 1 .section .preinit_arrayfoo .byte 1 .section .note .byte 1 .section .note2 .byte 1 .section .notefoo .byte 1 # CHECK: Name: .nobits # CHECK-NEXT: Type: SHT_PROGBITS # CHECK: Name: .nobits2 # CHECK-NEXT: Type: SHT_PROGBITS # CHECK: Name: .nobitsfoo # CHECK-NEXT: Type: SHT_PROGBITS # CHECK: Name: .init_array # CHECK-NEXT: Type: SHT_INIT_ARRAY # CHECK: Name: .init_array2 # CHECK-NEXT: Type: SHT_PROGBITS # CHECK: Name: .init_arrayfoo # CHECK-NEXT: Type: SHT_PROGBITS # CHECK: Name: .fini_array # CHECK-NEXT: Type: SHT_FINI_ARRAY # CHECK: Name: .fini_array2 # CHECK-NEXT: Type: SHT_PROGBITS # CHECK: Name: .fini_arrayfoo # CHECK-NEXT: Type: SHT_PROGBITS # CHECK: Name: .preinit_array # CHECK-NEXT: Type: SHT_PREINIT_ARRAY # CHECK: Name: .preinit_array2 # CHECK-NEXT: Type: SHT_PROGBITS # CHECK: Name: .preinit_arrayfoo # CHECK-NEXT: Type: SHT_PROGBITS # CHECK: Name: .note # CHECK-NEXT: Type: SHT_NOTE # CHECK: Name: .note2 # CHECK-NEXT: Type: SHT_NOTE # CHECK: Name: .notefoo # CHECK-NEXT: Type: SHT_NOTE
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_rept.s
# RUN: llvm-mc -triple i686-elf -filetype asm -o - %s | FileCheck %s .data .global two_bad_calls .type two_bad_calls,@function two_bad_calls: .rept 2 .long 0xbadca11 .endr # CHECK-LABEL: two_bad_calls # CHECK: .long 195938833 # CHECK: .long 195938833 .global half_a_dozen_daffodils .type half_a_dozen_daffodils,@function half_a_dozen_daffodils: .rep 6 .long 0xdaff0d11 .endr # CHECK-LABEL: half_a_dozen_daffodils # CHECK: .long 3674148113 # CHECK: .long 3674148113 # CHECK: .long 3674148113 # CHECK: .long 3674148113 # CHECK: .long 3674148113 # CHECK: .long 3674148113
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_zerofill.s
# RUN: llvm-mc -triple i386-apple-darwin9 %s | FileCheck %s # CHECK: TEST0: # CHECK: .zerofill __FOO,__bar,x,1 # CHECK: .zerofill __FOO,__bar,y,8,2 # CHECK: .zerofill __EMPTY,__NoSymbol # CHECK: .zerofill __DATA,__bss,"what you say?",8,3 TEST0: .zerofill __FOO, __bar, x, 2-1 .zerofill __FOO, __bar, y , 8 , 1+1 .zerofill __EMPTY,__NoSymbol # rdar://7965971 .zerofill __DATA, __bss, "what you say?", 8, 3
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/floating-literals.s
# RUN: not llvm-mc -triple i386-unknown-unknown %s 2> /dev/null | FileCheck %s # RUN: not llvm-mc -triple i386-unknown-unknown %s 2>&1 > /dev/null| FileCheck %s --check-prefix=CHECK-ERROR # CHECK: .long 1067412619 # CHECK: .long 1075000115 # CHECK: .long 1077936128 # CHECK: .long 1082549862 .single 1.2455, +2.3, 3, + 4.2 # CHECK: .long 2139095040 .single InFinIty # CHECK: .long 4286578688 .single -iNf # CHECK: .long 2147483647 .single nAN # CHECK: .long 1067928519 .float 1.307 # CHECK: .quad 4617315517961601024 # CHECK: .quad 4597526701198935065 # CHECK: .quad -4600933674317040845 .double 5, .232, -11.1 # CHECK: .quad 0 .double 0.0 # CHECK: .quad -4570379565595099136 .double -1.2e3 # CHECK: .quad -4690170861623122860 .double -1.2e-5 # CHECK: .quad -4465782973978902528 .double -1.2e+10 # CHECK: .quad 4681608360884174848 .double 1e5 # CHECK: .quad 4681608360884174848 .double 1.e5 # CHECK: .quad 4611686018427387904 .double 2. // APFloat should reject these with an error, not crash: //.double -1.2e+ //.double -1.2e # CHECK: .long 1310177520 .float 0x12f7.1ep+17 # CHECK: .long 1084227584 .float 0x.ap+3 # CHECK: .quad 4602678819172646912 .double 0x2.p-2 # CHECK: .long 1094713344 .float 0x3p2 # CHECK: .long 872284160 .float 0x7fp-30 # CHECK: .long 3212836864 .float -0x1.0p0 # CHECK-ERROR: invalid hexadecimal floating-point constant: expected at least one exponent digit # CHECK-ERROR: unexpected token in directive .float 0xa.apa # CHECK-ERROR: invalid hexadecimal floating-point constant: expected at least one exponent digit # CHECK-ERROR: unexpected token in directive .double -0x1.2p+ # CHECK-ERROR: invalid hexadecimal floating-point constant: expected at least one exponent digit # CHECK-ERROR: unexpected token in directive .double -0x1.2p # CHECK-ERROR: invalid hexadecimal floating-point constant: expected at least one significand digit # CHECK-ERROR: unexpected token in directive .float 0xp2 # CHECK-ERROR: invalid hexadecimal floating-point constant: expected at least one significand digit # CHECK-ERROR: unexpected token in directive .float 0x.p5 # CHECK-ERROR: error: invalid hexadecimal floating-point constant: expected exponent part 'p' # CHECK-ERROR: unexpected token in directive .float 0x1.2
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/bad-macro.s
// RUN: not llvm-mc -triple x86_64-apple-darwin10 %s 2>&1 | FileCheck %s .macro 23 // CHECK: expected identifier in '.macro' directive .macro abc 33 // CHECK: expected identifier in '.macro' directive
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_tdata.s
# RUN: llvm-mc -triple x86_64-unknown-darwin %s | FileCheck %s # CHECK: __DATA,__thread_data,thread_local_regular # CHECK: _a$tlv$init: # CHECK: .quad 4 .tdata _a$tlv$init: .quad 4
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/equ.s
// RUN: not llvm-mc -n -triple i386-unknown-unknown %s 2> %t // RUN: FileCheck < %t %s .equ a, 0 .set a, 1 .equ a, 2 .equiv a, 3 // CHECK: error: redefinition of 'a'
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_comm.s
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s # CHECK: TEST0: # CHECK: .comm a,6,2 # CHECK: .comm b,8 # CHECK: .comm c,8 TEST0: .comm a, 4+2, 2 .comm b,8 .common c,8
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/secure_log_unique.s
// RUN: rm -f %t // RUN: env AS_SECURE_LOG_FILE=%t llvm-mc -triple x86_64-apple-darwin %s // RUN: env AS_SECURE_LOG_FILE=%t llvm-mc -triple x86_64-apple-darwin %s // RUN: FileCheck --input-file=%t %s .secure_log_unique "foobar" // CHECK: "foobar" // CHECK-NEXT: "foobar"
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/cfi-window-save.s
# RUN: llvm-mc -filetype=asm -triple x86_64-pc-linux-gnu <%s | FileCheck %s # Should use SPARC as the target to test this. However, SPARC does not support # asm parsing yet. # CHECK: .cfi_window_save f: .cfi_startproc nop .cfi_window_save nop .cfi_endproc
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macros-argument-parsing-diagnostics.s
# RUN: not llvm-mc -triple i386 -filetype asm -o /dev/null %s 2>&1 | FileCheck %s .macro double first = -1, second = -1 # begin entry .long \first .long \second # end entry .endm double 0, 1, 2 # CHECK: error: too many positional arguments # CHECK: double 0, 1, 2 # CHECK: ^ double second = 1, 2 # CHECK: error: cannot mix positional and keyword arguments # CHECK: double second = 1, 2 # CHECK: ^ double third = 0 # CHECK: error: parameter named 'third' does not exist for macro 'double' # CHECK: double third = 0 # CHECK: ^
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/comments-x86-darwin.s
// RUN: llvm-mc -triple x86_64-apple-darwin %s 2>&1 | FileCheck %s # ensure that single '#' comments are worink as expected on x86 darwin .align 3 # test single hash after align // CHECK: .align 3 foo: # single hash should be ignored as comment // CHECK-LABEL: foo: movl %esp, %ebp # same after an instruction // CHECK: movl %esp, %ebp # movl %esp, %ebp ## start of the line // CHECK-NOT: movl %esp, %ebp # movl %esp, %ebp ## not quite start of the line // CHECK-NOT: movl %esp, %ebp bar: // CHECK-LABEL: bar:
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_elf_size.s
# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s a: ret .Lt: # CHECK: .size a, .Lt-a .size a, .Lt-a
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_org.s
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s # CHECK: TEST0: # CHECK: .org 1, 0 TEST0: .org 1 # CHECK: TEST1: # CHECK: .org 1, 3 TEST1: .org 1, 3
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_end-2.s
# RUN: llvm-mc -triple i386-unknown-unknown %s -I %p -filetype obj -o - \ # RUN: | llvm-readobj -t | FileCheck %s rock: movl $42, %eax .include "directive_end.s" hard_place: movl $42, %ebx # CHECK: Symbol { # CHECK: Name: rock # CHECK-NOT: Name: hard_place
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/ifeqs-diagnostics.s
// RUN: not llvm-mc -triple i386 %s -o /dev/null 2>&1 | FileCheck %s .ifeqs // CHECK: error: expected string parameter for '.ifeqs' directive // CHECK: .ifeqs // CHECK: ^ .ifeqs "string1" // CHECK: error: expected comma after first string for '.ifeqs' directive // CHECK: .ifeqs "string1" // CHECK: ^ .ifeqs "string1", // CHECK: error: expected string parameter for '.ifeqs' directive // CHECK: .ifeqs "string1", // CHECK: ^ // CHECK-NOT: error: unmatched .ifs or .elses .ifnes // CHECK: error: expected string parameter for '.ifnes' directive // CHECK: .ifnes // CHECK: ^ .ifnes "string1" // CHECK: error: expected comma after first string for '.ifnes' directive // CHECK: .ifnes "string1" // CHECK: ^ .ifnes "string1", // CHECK: error: expected string parameter for '.ifnes' directive // CHECK: .ifnes "string1", // CHECK: ^
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macros-argument-parsing.s
# RUN: llvm-mc -triple i386 -filetype asm -o - %s | FileCheck %s .macro it, cond .endm it ne .long 1 # CHECK: .long 1 .macro double first = -1, second = -1 # begin entry .long \first .long \second # end entry .endm double # CHECK: .long -1 # CHECK: .long -1 double 1 # CHECK: .long 1 # CHECK: .long -1 double 2, 3 # CHECK: .long 2 # CHECK: .long 3 double , 4 # CHECK: .long -1 # CHECK: .long 4 double 5, second = 6 # CHECK: .long 5 # CHECK: .long 6 double first = 7 # CHECK: .long 7 # CHECK: .long -1 double second = 8 # CHECK: .long -1 # CHECK: .long 8 double second = 9, first = 10 # CHECK: .long 10 # CHECK: .long 9 double second + 11 # CHECK: .long second+11 # CHECK: .long -1 double , second + 12 # CHECK: .long -1 # CHECK: .long second+12 double second # CHECK: .long second # CHECK: .long -1 .macro mixed arg0 = 0, arg1 = 1 arg2 = 2, arg3 = 3 # begin entry .long \arg0 .long \arg1 .long \arg2 .long \arg3 # end entry .endm mixed 1, 2 3 # CHECK: .long 1 # CHECK: .long 2 # CHECK: .long 3 # CHECK: .long 3 mixed 1 2, 3 # CHECK: .long 1 # CHECK: .long 2 # CHECK: .long 3 # CHECK: .long 3 mixed 1 2, 3 4 # CHECK: .long 1 # CHECK: .long 2 # CHECK: .long 3 # CHECK: .long 4
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_subsections_via_symbols.s
# RUN: llvm-mc -triple i386-apple-darwin9 %s | FileCheck %s # CHECK: TEST0: # CHECK: .subsections_via_symbols TEST0: .subsections_via_symbols
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/ifb.s
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s defined: # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifb .byte 1 .else .byte 0 .endif # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifb defined .byte 0 .else .byte 1 .endif # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifb undefined .byte 0 .else .byte 1 .endif # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifb "" .byte 0 .else .byte 1 .endif # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifnb .byte 0 .else .byte 1 .endif # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifnb defined .byte 1 .else .byte 0 .endif # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifnb undefined .byte 1 .else .byte 0 .endif # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifnb "" .byte 1 .else .byte 0 .endif
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_end.s
# RUN: llvm-mc -triple i386-unknown-unknown %s -filetype obj -o - \ # RUN: | llvm-readobj -t | FileCheck %s .end its_a_tarp: int $0x3 # CHECK: Symbol { # CHECK-NOT: Name: its_a_tarp
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_lsym.s
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s # FIXME: This is currently unsupported. If it turns out no one uses it, we # should just rip it out. # XFAIL: * # CHECK: TEST0: # CHECK: .lsym bar,foo # CHECK: .lsym baz,3 TEST0: .lsym bar, foo .lsym baz, 2+1
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/hello.s
// RUN: llvm-mc -triple i386-apple-darwin9 %s -o - // RUN: llvm-mc -triple i386-apple-darwin9 %s -o - -output-asm-variant=1 .text .align 4,0x90 .globl _main _main: pushl %ebp movl %esp, %ebp subl $8, %esp call "L1$pb" "L1$pb": popl %eax movl $0, -4(%ebp) movl %esp, %ecx leal L_.str-"L1$pb"(%eax), %eax movl %eax, (%ecx) call _printf movl $0, -4(%ebp) movl -4(%ebp), %eax addl $8, %esp popl %ebp //ret .subsections_via_symbols .cstring L_.str: .asciz "hello world!\n"
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/dollars-in-identifiers.s
# RUN: llvm-mc -triple i386-unknown-unknown %s > %t # RUN: FileCheck < %t %s // CHECK: .globl $foo .globl $foo // CHECK: .long ($foo) .long ($foo)
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_align.s
# RUN: not llvm-mc -triple i386-apple-darwin9 %s | FileCheck %s # CHECK: TEST0: # CHECK: .align 1 TEST0: .align 1 # CHECK: TEST1: # CHECK: .p2alignl 3, 0x0, 2 TEST1: .align32 3,,2 # CHECK: TEST2: # CHECK: .balign 3, 10 TEST2: .balign 3,10
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/purgem.s
# RUN: not llvm-mc -triple i386-unknown-unknown %s 2>&1 | FileCheck %s .macro foo .err .endm .purgem bar # CHECK: error: macro 'bar' is not defined .purgem foo foo # CHECK: error: invalid instruction mnemonic 'foo'
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/dot-symbol.s
# Historically 'as' treats '.' as a reference to the current location in # arbitrary contexts. We don't support this in general. # RUN: not llvm-mc -triple i386-unknown-unknown %s 2> %t # RUN: FileCheck -input-file %t %s # CHECK: invalid use of pseudo-symbol '.' as a label .: .long 0
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/labels.s
// RUN: llvm-mc -triple i686-apple-darwin10 %s | FileCheck %s .data // CHECK: a: a: .long 0 // CHECK: b: "b": .long 0 // CHECK: a$b: "a$b": .long 0 .text foo: // CHECK: addl $24, a$b(%eax) addl $24, "a$b"(%eax) // CHECK: addl $24, a$b+10(%eax) addl $24, ("a$b" + 10)(%eax) // CHECK: b$c = 10 "b$c" = 10 // CHECK: addl $10, %eax addl $"b$c", %eax // CHECK: "a 0" = 11 .set "a 0", 11 // CHECK: .long 11 .long "a 0" // XXCHCK: .section "a 1,a 2" //.section "a 1", "a 2" // CHECK: .globl "a 3" .globl "a 3" // CHECK: .desc "a 5",1 .desc "a 5", 1 // CHECK: .comm "a 6",1 .comm "a 6", 1 // CHECK: .lcomm "a 7",1 .lcomm "a 7", 1 // FIXME: We don't bother to support .lsym. // CHECX: .lsym "a 8",1 // .lsym "a 8", 1 // CHECK: "a 9" = a-b .set "a 9", a - b // CHECK: .long "a 9" .long "a 9"
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_space.s
# RUN: llvm-mc -triple i386-apple-darwin %s | FileCheck %s # CHECK: TEST0: # CHECK: .space 1 TEST0: .space 1 # CHECK: TEST1: # CHECK: .space 2,3 TEST1: .space 2, 3 # CHECK: TEST2: # CHECK: .space 1 TEST2: .skip 1
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_seh.s
# RUN: llvm-mc -triple x86_64-pc-win32 %s | FileCheck %s .text .globl func .def func; .scl 2; .type 32; .endef .seh_proc func # CHECK: .seh_proc func func: .seh_pushframe @code # CHECK: .seh_pushframe @code subq $24, %rsp .seh_stackalloc 24 # CHECK: .seh_stackalloc 24 movq %rsi, 16(%rsp) .seh_savereg %rsi, 16 # CHECK: .seh_savereg 6, 16 movups %xmm8, (%rsp) .seh_savexmm %xmm8, 0 # CHECK: .seh_savexmm 8, 0 pushq %rbx .seh_pushreg 3 # CHECK: .seh_pushreg 3 mov %rsp, %rbx .seh_setframe 3, 0 .seh_endprologue .seh_handler __C_specific_handler, @except .seh_handlerdata .long 0 .text .seh_startchained .seh_endprologue .seh_endchained # CHECK: .seh_setframe 3, 0 # CHECK: .seh_endprologue # CHECK: .seh_handler __C_specific_handler, @except # CHECK-NOT: .section{{.*}}.xdata # CHECK: .seh_handlerdata # CHECK: .text # CHECK: .seh_startchained # CHECK: .seh_endprologue # CHECK: .seh_endchained lea (%rbx), %rsp pop %rbx addq $24, %rsp ret .seh_endproc # CHECK: .seh_endproc
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macro-args.s
// RUN: llvm-mc -triple x86_64-apple-darwin10 %s | FileCheck %s .macro GET var,re2g movl \var@GOTOFF(%ebx),\re2g .endm .macro GET_DEFAULT var, re2g=%ebx, re3g=%ecx movl 2(\re2g, \re3g, 2), \var .endm GET is_sse, %eax // CHECK: movl is_sse@GOTOFF(%ebx), %eax GET_DEFAULT %ebx, , %edx // CHECK: movl 2(%ebx,%edx,2), %ebx GET_DEFAULT %ebx, %edx // CHECK: movl 2(%edx,%ecx,2), %ebx .macro bar .long $n .endm bar 1, 2, 3 bar // CHECK: .long 3 // CHECK: .long 0 .macro top middle _$0, $1 .endm .macro middle $0: .if $n > 1 bottom $1 .endif .endm .macro bottom .set fred, $0 .endm .text top foo top bar, 42 // CHECK: _foo: // CHECK-NOT: fred // CHECK: _bar // CHECK-NEXT: fred = 42 .macro foo foo_$0_$1_$2_$3: nop .endm foo 1, 2, 3, 4 foo 1, , 3, 4 // CHECK: foo_1_2_3_4: // CHECK: foo_1__3_4:
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macros-darwin.s
// RUN: not llvm-mc -triple i386-apple-darwin10 %s 2> %t.err | FileCheck %s // RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err .macro .test0 .macrobody0 .endmacro .macro .test1 .test0 .endmacro .test1 // CHECK-ERRORS: <instantiation>:1:1: error: unknown directive // CHECK-ERRORS-NEXT: macrobody0 // CHECK-ERRORS-NEXT: ^ // CHECK-ERRORS: <instantiation>:1:1: note: while in macro instantiation // CHECK-ERRORS-NEXT: .test0 // CHECK-ERRORS-NEXT: ^ // CHECK-ERRORS: 11:1: note: while in macro instantiation // CHECK-ERRORS-NEXT: .test1 // CHECK-ERRORS-NEXT: ^ .macro test2 .byte $0 .endmacro // CHECK: .byte 10 test2 10 .macro test3 .globl "$0 $1 $2 $$3 $n" .endmacro // CHECK: .globl "1 23 $3 2" test3 1, 2 3 // CHECK: .globl "1 (23) $3 2" test3 1, (2 3) // CHECK: .globl "12 $3 1" test3 1 2 .macro test4 .globl "$0 -- $1" .endmacro // CHECK: .globl "(ab)(,)) -- (cd)" test4 (a b)(,)),(cd) // CHECK: .globl "(ab)(,)) -- (cd)" test4 (a b)(,)),(cd) .macro test5 _a .globl "\_a" .endm // CHECK: .globl zed1 test5 zed1 .macro test6 $a .globl "\$a" .endm // CHECK: .globl zed2 test6 zed2 .macro test7 .a .globl "\.a" .endm // CHECK: .globl zed3 test7 zed3 .macro test8 _a, _b, _c .globl "\_a,\_b,\_c" .endmacro .macro test9 _a _b _c .globl "\_a \_b \_c" .endmacro // CHECK: .globl "a,b,c" test8 a, b, c // CHECK: .globl "%1,%2,%3" test8 %1, %2, %3 #a comment // CHECK: .globl "x-y,z,1" test8 x - y, z, 1 // CHECK: .globl "1 2 3" test9 1, 2,3 // CHECK: .globl "1,23," test8 1,2 3 // CHECK: .globl "12,3," test8 1 2, 3
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/align_invalid.s
# RUN: not llvm-mc -triple i386-linux-gnu < %s 2>&1 | FileCheck %s -check-prefix=ELF # RUN: not llvm-mc -triple i386-apple-darwin < %s 2>&1 | FileCheck %s -check-prefix=DARWIN .align 3 # ELF: error: alignment must be a power of 2 # DARWIN-NOT: error .align 32 # ELF-NOT: error # DARWIN: error: invalid alignment value
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/dot-symbol-non-absolute.s
# RUN: not llvm-mc -filetype=obj -triple i386-unknown-unknown %s 2> %t # RUN: FileCheck -input-file %t %s .extern foo # CHECK: error: expected absolute expression . = foo + 10 .byte 1
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macros-darwin-vararg.s
// RUN: llvm-mc -triple i386-apple-darwin10 %s 2>&1 | FileCheck %s .macro abc a b:vararg .globl "\a, \b" .endm // CHECK: .globl "zed0, zed1, zed2" abc zed0, zed1, zed2 .purgem abc .macro ifcc arg:vararg .if cc \arg .endif .endm .macro ifcc2 arg0 arg1:vararg .if cc movl \arg0, \arg1 .endif .endm .macro ifcc3 arg0, arg1:vararg .if cc movl \arg0, \arg1 .endif .endm .macro ifcc4 arg0, arg1:vararg .if cc movl \arg1, \arg0 .endif .endm .text // CHECK: movl %esp, %ebp // CHECK: subl $0, %esp // CHECK: movl %eax, %ebx // CHECK: movl %ecx, %ebx // CHECK: movl %ecx, %eax // CHECK: movl %eax, %ecx // CHECK: movl %ecx, %eax // CHECK: movl %eax, %ecx .set cc,1 ifcc movl %esp, %ebp subl $0, %esp ifcc2 %eax, %ebx ifcc2 %ecx, %ebx ifcc3 %ecx, %eax ifcc3 %eax, %ecx ifcc4 %eax, %ecx ## test ifcc4 %ecx, %eax ## test // CHECK-NOT movl // CHECK: subl $1, %esp .set cc,0 ifcc movl, %esp, %ebp subl $1, %esp .macro abc arg:vararg=nop \arg .endm .macro abcd arg0=%eax, arg1:vararg=%ebx movl \arg0, \arg1 .endm .text // CHECK: nop abc // CHECK: movl %eax, %ebx abcd , .macro .make_macro start, end, name, body:vararg \start \name \body \end .endmacro .make_macro .macro,.endmacro,.mybyte,.byte $0, $2, $1 .data // CHECK: .byte 10 // CHECK: .byte 12 // CHECK: .byte 11 .mybyte 10,11,12
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/conditional_asm.s
# RUN: llvm-mc -triple i386-unknown-unknown %s -I %p | FileCheck %s # CHECK: .byte 2 .if 1+2 .if 1-1 .byte 1 .elseif 2+2 .byte 1+1 .else .byte 0 .endif .endif # CHECK: .byte 0 # CHECK-NOT: .byte 1 .ifeq 32 - 32 .byte 0 .else .byte 1 .endif # CHECK: .byte 0 # CHECK: .byte 1 # CHECK-NOT: .byte 2 .ifge 32 - 31 .byte 0 .endif .ifge 32 - 32 .byte 1 .endif .ifge 32 - 33 .byte 2 .endif # CHECK: .byte 0 # CHECK-NOT: .byte 1 # CHECK-NOT: .byte 2 .ifgt 32 - 31 .byte 0 .endif .ifgt 32 - 32 .byte 1 .endif .ifgt 32 - 33 .byte 2 .endif # CHECK-NOT: .byte 0 # CHECK: .byte 1 # CHECK: .byte 2 .ifle 32 - 31 .byte 0 .endif .ifle 32 - 32 .byte 1 .endif .ifle 32 - 33 .byte 2 .endif # CHECK-NOT: .byte 0 # CHECK-NOT: .byte 1 # CHECK: .byte 2 .iflt 32 - 31 .byte 0 .endif .iflt 32 - 32 .byte 1 .endif .iflt 32 - 33 .byte 2 .endif # CHECK: .byte 1 # CHECK-NOT: .byte 0 .ifne 32 - 32 .byte 0 .else .byte 1 .endif
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/ifnes.s
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifnes "foo space", "foo space" .byte 0 .else .byte 1 .endif # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifnes "unequal", "unEqual" .byte 1 .else .byte 0 .endif # CHECK-NOT: .byte 0 # CHECK: .byte 1 .ifnes "equal", "equal" ; .byte 0 ; .else ; .byte 1 ; .endif
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_loc.s
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s # RUN: llvm-mc -triple i386-unknown-unknown %s -filetype=null .file 1 "hello" # CHECK: .file 1 "hello" .loc 1 .loc 1 2 # CHECK: .loc 1 2 0 .loc 1 2 3 # CHECK: .loc 1 2 3 .loc 1 2 discriminator 1 # CHECK: 1 2 0 discriminator 1 .loc 1 2 0 isa 3 # CHECK: 1 2 0 isa 3 .loc 1 0
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/exprs.s
// RUN: llvm-mc -triple i386-apple-darwin %s .macro check_expr .if ($0) != ($1) .abort Unexpected $0 != $1. .endif .endmacro .text g: h: j: k: .data check_expr !1 + 2, 2 check_expr !0, 1 check_expr ~0, -1 check_expr -1, ~0 check_expr +1, 1 check_expr 1 + 2, 3 check_expr 1 & 3, 1 check_expr 4 / 2, 2 check_expr 4 / -2, -2 check_expr 1 == 1, 1 check_expr 1 == 0, 0 check_expr 1 > 0, 1 check_expr 1 >= 1, 1 check_expr 1 < 2, 1 check_expr 1 <= 1, 1 check_expr 4 % 3, 1 check_expr 2 * 2, 4 check_expr 2 != 2, 0 check_expr 2 <> 2, 0 check_expr 1 | 2, 3 check_expr 1 << 1, 2 check_expr 2 >> 1, 1 check_expr (~0 >> 1), -1 check_expr 3 - 2, 1 check_expr 1 ^ 3, 2 check_expr 1 && 2, 1 check_expr 3 && 0, 0 check_expr 0 && 1, 0 check_expr 1 || 2, 1 check_expr 0 || 1, 1 check_expr 0 || 0, 0 check_expr 1 + 2 < 3 + 4, 1 check_expr 1 << 8 - 1, 128 check_expr 3 * 9 - 2 * 9 + 1, 10 .set c, 10 check_expr c + 1, 11 d = e + 10 .long d f = g - h + 5 .long f i = (j + 10) - (k + 2) .long i l = m - n + 4 .text m: n: nop movw $8, (42)+66(%eax) // "." support: _f0: L0: jmp L1 .long . - L0 L1: jmp A .long . - L1
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/exprs-invalid.s
// RUN: not llvm-mc -triple x86_64-apple-darwin10 %s 2> %t.err | FileCheck %s // RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err // CHECK: .section __TEXT,__text,regular,pure_instructions // CHECK-ERRORS: error: invalid octal number .long 80+08 // CHECK-ERRORS: error: invalid hexadecimal number .long 80+0xzz // CHECK-ERRORS: error: literal value out of range for directive .byte 256 // CHECK-ERRORS: error: literal value out of range for directive .long 4e71cf69 // double floating point constant due to missing "0x"
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/dash-n.s
// RUN: not llvm-mc -n -triple i386-unknown-unknown %s 2> %t // RUN: FileCheck < %t %s .globl a // CHECK: error: expected section directive before assembly directive .long 0
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/defsym_error2.s
# RUN: not llvm-mc -filetype=obj -triple=i386-unknown-elf -defsym a=a %s 2>&1 | FileCheck %s # CHECK: error: Value is not an integer: a
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/dot-symbol-assignment.s
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s .extern start # CHECK: .org 1024, 0 . = 0x400 lgdt 0x400 + 0x100 ljmpl $0x08, $(0x400 + 0x150) # CHECK: .org 1280, 0 . = 0x400 + 0x100 .word (3*8)-1 .quad (0x400 + 0x110) # CHECK: .org 1296, 0 . = 0x400 + 0x110 .quad 0x0 .quad 0x0020980000000000 .quad 0x0000900000000000 .code64 # CHECK: .org 1360, 0 . = 0x400 + 0x150 movabsq $start, %rcx jmp *%rcx . = 0x300
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/at-pseudo-variable.s
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s .macro A add $1\@, %eax .endm .macro B sub $1\@, %eax .endm A # CHECK: addl $10, %eax A # CHECK: addl $11, %eax B # CHECK: subl $12, %eax B # CHECK: subl $13, %eax # The following uses of \@ are undocumented, but valid: .irpc foo,234 add $\foo\@, %eax .endr # CHECK: addl $24, %eax # CHECK: addl $34, %eax # CHECK: addl $44, %eax .irp reg,%eax,%ebx sub $2\@, \reg .endr # CHECK: subl $24, %eax # CHECK: subl $24, %ebx # Test that .irp(c) and .rep(t) do not increase \@. # Only the use of A should increase \@, so we can test that it increases by 1 # each time. .irpc foo,123 sub $\foo, %eax .endr A # CHECK: addl $14, %eax .irp reg,%eax,%ebx sub $4, \reg .endr A # CHECK: addl $15, %eax .rept 2 sub $5, %eax .endr A # CHECK: addl $16, %eax .rep 3 sub $6, %eax .endr A # CHECK: addl $17, %eax
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macro-rept-err2.s
// RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2> %t // RUN: FileCheck < %t %s .rept 3 .long // CHECK: no matching '.endr' in definition
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macro-qualifier-diagnostics.s
# RUN: not llvm-mc -triple i386 -o /dev/null %s 2>&1 | FileCheck %s .macro missing_qualifier parameter: # CHECK: error: missing parameter qualifier for 'parameter' in macro 'missing_qualifier' # CHECK: .macro missing_qualifier parameter: # CHECK: ^ .macro non_identifier_qualifier parameter:0 # CHECK: error: missing parameter qualifier for 'parameter' in macro 'non_identifier_qualifier' # CHECK: .macro non_identifier_qualifier parameter:0 # CHECK: ^ .macro invalid_qualifier parameter:invalid_qualifier # CHECK: error: invalid_qualifier is not a valid parameter qualifier for 'parameter' in macro 'invalid_qualifier' # CHECK: .macro invalid_qualifier parameter:invalid_qualifier # CHECK: ^ .macro pointless_default parameter:req=default .endm # CHECK: warning: pointless default value for required parameter 'parameter' in macro 'pointless_default' # CHECK: .macro pointless_default parameter:req=default # CHECK: ^ .macro missing_required_parameter parameter:req .endm missing_required_parameter # CHECK: error: missing value for required parameter 'parameter' in macro 'missing_required_parameter' # CHECK: missing_required_parameter # CHECK: ^ .macro missing_second_required_argument first=0 second:req .endm missing_second_required_argument # CHECK: error: missing value for required parameter 'second' in macro 'missing_second_required_argument' # CHECK: missing_second_required_argument # CHECK: ^ .macro second_third_required first=0 second:req third:req .endm second_third_required 0 # CHECK: error: missing value for required parameter 'second' in macro 'second_third_required' # CHECK: second_third_required 0 # CHECK: ^ # CHECK: error: missing value for required parameter 'third' in macro 'second_third_required' # CHECK: second_third_required 0 # CHECK: ^ second_third_required third=3 first=1 # CHECK: error: missing value for required parameter 'second' in macro 'second_third_required' # CHECK: second_third_required third=3 first=1 # CHECK: ^
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macro-def-in-instantiation.s
// RUN: llvm-mc -triple x86_64-apple-darwin10 %s | FileCheck %s .macro .make_macro $0 $1 $2 $3 $4 .endmacro .make_macro .macro,.mybyte,.byte,$0,.endmacro .data // CHECK: .byte 10 .mybyte 10 // PR18599 .macro macro_a .macro macro_b .byte 10 .macro macro_c .endm macro_c .purgem macro_c .endm macro_b .endm macro_a macro_b // CHECK: .byte 10 // CHECK: .byte 10
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/expr_symbol_modifiers.s
// RUN: not llvm-mc -triple x86_64-unknown-unknown %s > %t 2> %t.err // RUN: FileCheck < %t %s // RUN: FileCheck -check-prefix=CHECK-STDERR < %t.err %s // CHECK: .long 1 .long 1 // CHECK-STDERR: invalid modifier 'GOTPCREL' (no symbols present) .long 10 + 4@GOTPCREL // CHECK: .long a@GOTPCREL+4 .long a + 4@GOTPCREL // CHECK: .long a@GOTPCREL+b@GOTPCREL .long (a + b)@GOTPCREL // CHECK: .long (10+b@GOTPCREL)+4 .long 10 + b + 4@GOTPCREL
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/ifeqs.s
// RUN: llvm-mc -triple i386 %s | FileCheck %s .ifeqs "alpha", "alpha" .byte 1 .else .byte 0 .endif // CHECK-NOT: .byte 0 // CHECK: .byte 1 .ifeqs "alpha", "alpha " .byte 0 .else .byte 1 .endif // CHECK-NOT: .byte 0 // CHECK: .byte 1
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macro-rept-err1.s
// RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2> %t // RUN: FileCheck < %t %s .endr // CHECK: unmatched '.endr' directive
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive-err-diagnostics.s
// RUN: not llvm-mc -triple i386 %s 2>&1 | FileCheck %s .error 0 // CHECK: error: .error argument must be a string // CHECK: .error 0 // CHECK: ^ .ifeqs "0", "1" .ifeqs "", "" .error "message" .endif .endif // CHECK-NOT: error: message // CHECK-NOT: error: invalid instruction mnemonic 'message' // CHECK-NOT: .error "message" // CHECK-NOT: ^
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macro-rept.s
// RUN: llvm-mc -triple x86_64-unknown-unknown %s | FileCheck %s .rept 2 .long 1 .endr .rept 3 .rept 2 .long 0 .endr .endr // CHECK: .long 1 // CHECK: .long 1 // CHECK: .long 0 // CHECK: .long 0 // CHECK: .long 0 // CHECK: .long 0 // CHECK: .long 0 // CHECK: .long 0
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_abort.s
# RUN: not llvm-mc -triple i386-unknown-unknown %s 2> %t # RUN: FileCheck -input-file %t %s # CHECK: error: .abort 'please stop assembing' TEST0: .abort please stop assembing
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/defsym.s
# RUN: llvm-mc -filetype=obj -triple=i386-unknown-elf -defsym a=7 -defsym b=11 %s | llvm-objdump -t - | FileCheck %s .ifndef a .err .endif .if a<>7 .err .endif .ifndef b .err .endif .if b<>11 .err .endif # CHECK: 00000007 *ABS* 00000000 a # CHECK: 0000000b *ABS* 00000000 b
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_line.s
# RUN: llvm-mc -triple i386-unknown-unknown %s # RUN: llvm-mc -triple i386-unknown-unknown %s -filetype=null # FIXME: Actually test the output. .line .line 1
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/vararg.s
// RUN: llvm-mc -triple x86_64-linux-gnu %s | FileCheck %s .macro ifcc arg:vararg .if cc \arg .endif .endm .macro ifcc2 arg0 arg1:vararg .if cc movl \arg0, \arg1 .endif .endm .macro ifcc3 arg0, arg1:vararg .if cc movl \arg0, \arg1 .endif .endm .macro ifcc4 arg0, arg1:vararg .if cc movl \arg1, \arg0 .endif .endm .text // CHECK: movl %esp, %ebp // CHECK: subl $0, %esp // CHECK: movl %eax, %ebx // CHECK: movl %ecx, %ebx // CHECK: movl %ecx, %eax // CHECK: movl %eax, %ecx // CHECK: movl %ecx, %eax // CHECK: movl %eax, %ecx .set cc,1 ifcc movl %esp, %ebp subl $0, %esp ifcc2 %eax %ebx ifcc2 %ecx, %ebx ifcc3 %ecx %eax ifcc3 %eax, %ecx ifcc4 %eax %ecx ## test ifcc4 %ecx, %eax ## test // CHECK-NOT movl // CHECK: subl $1, %esp .set cc,0 ifcc movl %esp, %ebp subl $1, %esp
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/if-diagnostics.s
// RUN: not llvm-mc -triple i386 %s -o /dev/null 2>&1 | FileCheck %s .if .endif // CHECK: error: unknown token in expression // CHECK: .if // CHECK: ^ .ifeq 0, 3 .endif // CHECK:error: unexpected token in '.if' directive // CHECK: .ifeq 0, 3 // CHECK: ^ .iflt "string1" .endif // CHECK: error: expected absolute expression // CHECK: .iflt "string1" // CHECK: ^ .ifge test .endif // CHECK: error: expected absolute expression // CHECK: .ifge test // CHECK: ^
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macros-parsing.s
// RUN: not llvm-mc -triple x86_64-apple-darwin10 %s 2> %t.err // RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err .macro .test0 .endmacro .macros_off // CHECK-ERRORS: 9:1: error: unknown directive .test0 .macros_on .test0 // CHECK-ERRORS: macro '.test0' is already defined .macro .test0 .endmacro // CHECK-ERRORS: unexpected '.endmacro' in file .endmacro // CHECK-ERRORS: no matching '.endmacro' in definition .macro dummy
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/macro-irpc.s
// RUN: llvm-mc -triple x86_64-unknown-unknown %s | FileCheck %s .irpc foo,123 .long \foo .endr // CHECK: long 1 // CHECK: long 2 // CHECK: long 3
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/ifndef.s
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s # CHECK: .byte 1 # CHECK-NOT: byte 0 .ifndef undefined .byte 1 .else .byte 0 .endif defined: # CHECK-NOT: byte 0 # CHECK: .byte 1 .ifndef defined .byte 0 .else .byte 1 .endif movl %eax, undefined # CHECK: .byte 1 # CHECK-NOT: byte 0 .ifndef undefined .byte 1 .else .byte 0 .endif
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/pr11865.s
// RUN: llvm-mc -triple i386-unknown-unknown %s i: .long g g = h h = i
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/rename.s
// RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s .size bar, . - bar .Ltmp01: .size foo, .Ltmp01 - foo .Ltmp0: .size qux, .Ltmp0 - qux // CHECK: .Ltmp0: // CHECK: .size bar, .Ltmp0-bar // CHECK: .Ltmp01 // CHECK: .size foo, .Ltmp01-foo // CHECK: .Ltmp00 // CHECK: .size qux, .Ltmp00-qux
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_file-errors.s
// RUN: not llvm-mc -g -triple i386-unknown-unknown %s 2> %t.err | FileCheck %s // RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err // Test for Bug 11740 .file "hello" .file 1 "world" // CHECK: .file "hello" // CHECK-ERRORS:6:9: error: input can't have .file dwarf directives when -g is used to generate dwarf debug info for assembly code
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive-err.s
// RUN: not llvm-mc -triple i386 %s 2>&1 | FileCheck %s .err // CHECK: error: .err encountered // CHECK-NEXT: .err // CHECK-NEXT: ^ .ifc a,a .err .endif // CHECK: error: .err encountered // CHECK-NEXT: .err // CHECK-NEXT: ^ .ifnc a,a .err .endif // CHECK-NOT: error: .err encountered .error "This is my error. There are many like it, but this one is mine." // CHECK: error: This is my error. There are many like it, but this one is mine. .ifc one, two .error "My error is my best friend." .endif // CHECK-NOT: error: My error is my best friend. .error // CHECK: error: .error directive invoked in source file
0
repos/DirectXShaderCompiler/test/MC
repos/DirectXShaderCompiler/test/MC/AsmParser/directive_incbin.s
# RUN: llvm-mc -triple i386-unknown-unknown %s -I %p | FileCheck %s .data .incbin "incbin\137abcd" # "\137" is underscore "_" # CHECK: .ascii "abcd\n"
0
repos/DirectXShaderCompiler/test/MC/Disassembler
repos/DirectXShaderCompiler/test/MC/Disassembler/XCore/xcore.txt
# RUN: llvm-mc --disassemble %s -triple=xcore-xmos-elf | FileCheck %s # 0r instructions # CHECK: clre 0xed 0x07 # CHECK: get r11, id 0xee 0x17 # CHECK: get r11, ed 0xfe 0x0f # CHECK: get r11, et 0xff 0x0f # CHECK: ssync 0xee 0x07 # CHECK: waiteu 0xec 0x07 # CHECK: dcall 0xfc 0x07 # CHECK: dentsp 0xec 0x17 # CHECK: drestsp 0xed 0x17 # CHECK: dret 0xfe 0x07 # CHECK: freet 0xef 0x07 # CHECK: get r11, kep 0xef 0x17 # CHECK: get r11, ksp 0xfc 0x17 # CHECK: kret 0xfd 0x07 # CHECK: ldw et, sp[4] 0xfe 0x17 # CHECK: ldw sed, sp[3] 0xfd 0x17 # CHECK: ldw spc, sp[1] 0xec 0x0f # CHECK: ldw ssr, sp[2] 0xee 0x0f # CHECK: set kep, r11 0xff 0x07 # CHECK: stw et, sp[4] 0xfd 0x0f # CHECK: stw sed, sp[3] 0xfc 0x0f # CHECK: stw spc, sp[1] 0xed 0x0f # CHECK: stw ssr, sp[2] 0xef 0x0f # 1r instructions # CHECK: msync res[r0] 0xf0 0x1f # CHECK: mjoin res[r1] 0xf1 0x17 # CHECK: bau r2 0xf2 0x27 # CHECK: set sp, r3 0xf3 0x2f # CHECK: ecallt r4 0xf4 0x4f # CHECK: ecallf r5 0xe5 0x4f # CHECK: bla r6 0xe6 0x27 # CHECK: bru r8 0xe8 0x2f # CHECK: syncr res[r7] 0xf7 0x87 # CHECK: freer res[r8] 0xe8 0x17 # CHECK: setv res[r9], r11 0xf9 0x47 # CHECK: setev res[r10], r11 0xfa 0x3f # CHECK: eeu res[r11] 0xfb 0x07 # CHECK: set dp, r5 0xe5 0x37 # CHECK: set cp, r0 0xf0 0x37 # CHECK: dgetreg r11 0xeb 0x3f # CHECK: edu res[r8] 0xe8 0x07 # CHECK: kcall r2 0xe2 0x47 # CHECK: waitef r10 0xfa 0x0f # CHECK: waitet r7 0xe7 0x0f # CHECK: start t[r4] 0xe4 0x1f # CHECK: clrpt res[r9] 0xe9 0x87 # 2r instructions # CHECK: not r1, r8 0x24 0x8f # CHECK: neg r7, r6 0xce 0x97 # CHECK: andnot r10, r11 0xab 0x2f # CHECK: mkmsk r11, r0 0x4c 0xa7 # CHECK: getts r8, res[r1] 0x41 0x3f # CHECK: setpt res[r2], r3 0xde 0x3e # CHECK: outct res[r1], r2 0xc6 0x4e # CHECK: outt res[r5], r4 0xd1 0x0f # CHECK: out res[r9], r10 0xa9 0xaf # CHECK: outshr res[r0], r2 0xd8 0xae # CHECK: inct r7, res[r4] 0xdc 0x87 # CHECK: int r8, res[r3] 0x53 0x8f # CHECK: in r10, res[r0] 0x48 0xb7 # CHECK: inshr r4, res[r2] 0x12 0xb7 # CHECK: chkct res[r6], r0 0x08 0xcf # CHECK: testct r8, res[r3] 0x53 0xbf # CHECK: testwct r2, res[r9] 0x39 0xc7 # CHECK: setd res[r3], r4 0x13 0x17 # CHECK: getst r7, res[r1] 0x1d 0x07 # CHECK: init t[r1]:sp, r2 0xc9 0x16 # CHECK: init t[r10]:pc, r1 0x26 0x07 # CHECK: init t[r2]:cp, r10 0x4a 0x1f # CHECK: init t[r2]:dp, r3 0xce 0x0e # CHECK: setpsc res[r8], r2 0x28 0xc7 # CHECK: zext r3, r8 0x2c 0x47 # CHECK: sext r9, r1 0x45 0x37 # CHECK: tsetmr r7, r3 0x1f 0x1f # CHECK: eef r1, res[r6] 0x96 0x2f # CHECK: eet r11, res[r0] 0x5c 0x27 # rus instructions # CHECK: chkct res[r1], 8 0x34 0xcf # CHECK: getr r11, 2 0x4e 0x87 # CHECK: mkmsk r4, 24 0x72 0xa7 # CHECK: outct res[r3], 0 0xdc 0x4e # CHECK: sext r8, 16 0xb1 0x37 # CHECK: zext r2, 32 0xd8 0x46 # CHECK: peek r0, res[r5] 0x81 0xbf # CHECK: endin r10, res[r1] 0x59 0x97 # l2r instructions # CHECK: bitrev r1, r10 0x26 0xff 0xec 0x07 # CHECK: byterev r4, r1 0x11 0xff 0xec 0x07 # CHECK: clz r11, r10 0xae 0xff 0xec 0x0f # CHECK: get r3, ps[r6] 0x9e 0xff 0xec 0x17 # CHECK: setc res[r5], r9 0x75 0xff 0xec 0x2f # CHECK: init t[r2]:lr, r1 0xc6 0xfe 0xec 0x17 # CHECK: setclk res[r2], r1 0xd6 0xfe 0xec 0x0f # CHECK: set ps[r9], r10 0xa9 0xff 0xec 0x1f # CHECK: setrdy res[r3], r1 0xc7 0xfe 0xec 0x2f # CHECK: settw res[r7], r2 0x9b 0xff 0xec 0x27 # CHECK: getd r8, res[r3] 0x53 0xff 0xec 0x1f # CHECK: getn r10, res[r11] 0xbb 0xff 0xec 0x37 # CHECK: testlcl r2, res[r0] 0xc8 0xfe 0xec 0x27 # CHECK: setn res[r9], r7 0x6d 0xff 0xec 0x37 # 3r instructions # CHECK: add r1, r2, r3 0x1b 0x10 # CHECK: and r11, r10, r9 0xb9 0x3e # CHECK: eq r6, r1, r2 0x66 0x30 # CHECK: ld16s r8, r3[r4] 0xcc 0x82 # CHECK: ld8u r9, r1[r10] 0x16 0x8d # CHECK: ldw r9, r4[r5] 0x91 0x4b # CHECK: lss r7, r3, r0 0x7c 0xc0 # CHECK: lsu r5, r8, r6 0x12 0xcc # CHECK: or r1, r3, r2 0x1e 0x40 # CHECK: shl r8, r2, r4 0xc8 0x22 # CHECK: shr r9, r7, r1 0x5d 0x29 # CHECK: sub r4, r2, r5 0x89 0x1a # CHECK: set t[r0]:r1, r2 0x18 0xb8 # 2rus instructions # CHECK: add r10, r2, 5 0xe9 0x92 # CHECK: eq r2, r1, 0 0x24 0xb0 # CHECK: ldw r5, r6[1] 0x19 0x09 # CHECK: shl r6, r5, 24 0xa6 0xa5 # CHECK: shr r3, r8, 5 0xf1 0xab # CHECK: stw r3, r2[0] 0x38 0x00 # CHECK: sub r2, r4, 11 0x63 0x9d # l3r instructions # CHECK: ashr r5, r1, r11 0xd7 0xfc 0xec 0x17 # CHECK: crc32 r5, r6, r1 0x19 0xf9 0xec 0xaf # CHECK: divu r9, r1, r3 0x97 0xf8 0xec 0x4f # CHECK: divs r6, r7, r2 0x2e 0xf9 0xec 0x47 # CHECK: lda16 r11, r2[r1] 0xb9 0xf8 0xec 0x2f # CHECK: lda16 r9, r3[-r11] 0x1f 0xfd 0xec 0x37 # CHECK: ldaw r9, r1[r2] 0x96 0xf8 0xec 0x1f # CHECK: ldaw r8, r7[-r11] 0xcf 0xfd 0xec 0x27 # CHECK: mul r0, r4, r2 0xc2 0xf8 0xec 0x3f # CHECK: remu r1, r2, r3 0x1b 0xf8 0xec 0xcf # CHECK: rems r11, r10, r9 0xb9 0xfe 0xec 0xc7 # CHECK: st16 r5, r3[r8] 0xdc 0xfc 0xec 0x87 # CHECK: st8 r9, r1[r3] 0x97 0xf8 0xec 0x8f # CHECK: stw r7, r10[r1] 0xf9 0xf9 0xec 0x07 # CHECK: xor r4, r3, r9 0xcd 0xfc 0xec 0x0f # l2rus instructions # CHECK: ashr r5, r1, 3 0x57 0xf8 0xec 0x97 # CHECK: ldaw r11, r10[6] 0x7a 0xfc 0xec 0x9f # CHECK: ldaw r8, r2[-9] 0x09 0xfd 0xec 0xa7 # CHECK: inpw r6, res[r1], 8 0xe4 0xfc 0xee 0x97 # CHECK: outpw res[r3], r0, 2 0x0e 0xf8 0xed 0x97 # ru6 / lru6 instructions # CHECK: bt r6, -5 0x85 0x75 # CHECK: bt r10, -451 0x07 0xf0 0x83 0x76 # CHECK: bt r8, 10 0x0a 0x72 # CHECK: bt r1, 6451 0x64 0xf0 0x73 0x70 # CHECK: bf r5, 8 0x48 0x79 # CHECK: bf r6, 65 0x01 0xf0 0x81 0x79 # CHECK: bf r1, 53 0x75 0x78 # CHECK: bf r10, 101 0x01 0xf0 0xa5 0x7a # CHECK: ldaw r11, dp[63] 0xff 0x62 # CHECK: ldaw r1, dp[456] 0x07 0xf0 0x48 0x60 # CHECK: ldaw cp, dp[5] 0x05 0x63 # CHECK: ldaw sp, dp[9929] 0x9b 0xf0 0x89 0x63 # CHECK: ldaw r3, sp[2] 0xc2 0x64 # CHECK: ldaw r8, sp[65535] 0xff 0xf3 0x3f 0x66 # CHECK: ldaw sp, sp[41] 0xa9 0x67 # CHECK: ldaw sp, sp[13121] 0xcd 0xf0 0x81 0x67 # CHECK: ldc r3, 30 0xde 0x68 # CHECK: ldc r11, 1000 0x0f 0xf0 0xe8 0x6a # CHECK: ldc sp, 0 0x80 0x6b # CHECK: ldc lr, 81 0x01 0xf0 0xd1 0x6b # CHECK: ldw r0, cp[4] 0x04 0x6c # CHECK: ldw r1, cp[32345] 0xf9 0xf1 0x59 0x6c # CHECK: ldw cp, cp[8] 0x08 0x6f # CHECK: ldw sp, cp[10222] 0x9f 0xf0 0xae 0x6f # CHECK: ldw r10, dp[16] 0x90 0x5a # CHECK: ldw r10, dp[76] 0x01 0xf0 0x8c 0x5a # CHECK: ldw lr, dp[8] 0xc8 0x5b # CHECK: ldw dp, dp[33221] 0x07 0xf2 0x45 0x5b # CHECK: ldw r8, sp[51] 0x33 0x5e # CHECK: ldw r8, sp[1225] 0x13 0xf0 0x09 0x5e # CHECK: ldw cp, sp[31] 0x1f 0x5f # CHECK: ldw sp, sp[1000] 0x0f 0xf0 0xa8 0x5f # CHECK: setc res[r5], 36 0x64 0xe9 # CHECK: setc res[r2], 40312 0x75 0xf2 0xb8 0xe8 # CHECK: stw r8, dp[14] 0x0e 0x52 # CHECK: stw r9, dp[654] 0x0a 0xf0 0x4e 0x52 # CHECK: stw lr, dp[23] 0xd7 0x53 # CHECK: stw sp, dp[44442] 0xb6 0xf2 0x9a 0x53 # CHECK: stw r1, sp[32] 0x60 0x54 # CHECK: stw r0, sp[8761] 0x88 0xf0 0x39 0x54 # CHECK: stw cp, sp[63] 0x3f 0x57 # CHECK: stw lr, sp[4391] 0x44 0xf0 0xe7 0x57 # u6 / lu6 instructions # CHECK: bu -20 0x14 0x77 # CHECK: bu -1000 0x0f 0xf0 0x28 0x77 # CHECK: bu 24 0x18 0x73 # CHECK: bu 2231 0x22 0xf0 0x37 0x73 # CHECK: extsp 9 0x89 0x77 # CHECK: extsp 5721 0x59 0xf0 0x99 0x77 # CHECK: clrsr 60 0x3c 0x7b # CHECK: clrsr 64391 0xee 0xf3 0x07 0x7b # CHECK: entsp 1 0x41 0x77 # CHECK: entsp 70 0x01 0xf0 0x46 0x77 # CHECK: ldaw r11, cp[5] 0x45 0x7f # CHECK: ldaw r11, cp[33000] 0x03 0xf2 0x68 0x7f # CHECK: retsp 40 0xe8 0x77 # CHECK: retsp 52010 0x2c 0xf3 0xea 0x77 # CHECK: setsr 42 0x6a 0x7b # CHECK: setsr 21863 0x55 0xf1 0x67 0x7b # CHECK: extdp 4 0x84 0x73 # CHECK: extdp 554 0x08 0xf0 0xaa 0x73 # CHECK: blat 9 0x49 0x73 # CHECK: blat 61212 0xbc 0xf3 0x5c 0x73 # CHECK: getsr r11, 54 0x36 0x7f # CHECK: getsr r11, 442 0x06 0xf0 0x3a 0x7f # CHECK: kcall 11 0xcb 0x73 # CHECK: kcall 4001 0x3e 0xf0 0xe1 0x73 # CHECK: kentsp 22 0x96 0x7b # CHECK: kentsp 8793 0x89 0xf0 0x99 0x7b # CHECK: krestsp 0 0xc0 0x7b # CHECK: krestsp 55312 0x60 0xf3 0xd0 0x7b # u10 / lu10 instructions # CHECK: ldap r11, 40 0x28 0xd8 # CHECK: ldap r11, 53112 0x33 0xf0 0x78 0xdb # CHECK: ldap r11, -22 0x16 0xdc # CHECK: ldap r11, -9999 0x09 0xf0 0x0f 0xdf # CHECK: bl 8 0x08 0xd0 # CHECK: bl 38631 0x25 0xf0 0xe7 0xd2 # CHECK: bl -222 0xde 0xd4 # CHECK: bl -55132 0x35 0xf0 0x5c 0xd7 # CHECK: bla cp[500] 0xf4 0xe1 # CHECK: bla cp[413742] 0x94 0xf1 0x2e 0xe0 # CHECK: ldw r11, cp[132] 0x84 0xe4 # CHECK: ldw r11, cp[102741] 0x64 0xf0 0x55 0xe5 # l6r instructions # CHECK: lmul r11, r0, r2, r5, r8, r10 0xf9 0xfa 0x02 0x06 # l5r instructions # CHECK: ladd r10, r2, r5, r1, r7 0xe5 0xf8 0xfb 0x06 # CHECK: ldivu r5, r6, r3, r9, r8 0x54 0xfe 0x0b 0x07 # CHECK: lsub r1, r8, r7, r11, r5 0xcf 0xfd 0x85 0x0f # l4r instructions # CHECK: crc8 r6, r3, r4, r11 0x73 0xfd 0xe6 0x07 # CHECK: maccs r11, r8, r2, r4 0xf8 0xfa 0xe8 0x0f # CHECK: maccu r0, r2, r5, r8 0x44 0xfd 0xf2 0x07
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/multiple-missing-prefixes.txt
// RUN: FileCheck -check-prefix=ANOTHER-PREFIX -input-file %s %s // RUN: not FileCheck -check-prefix=PREFIX1 -check-prefix=PREFIX2 -input-file %s %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK-NONEXISTENT-PREFIX -check-prefix=ALSO-NONEXISTENT %s foobar ; ANOTHER-PREFIX: foobar ; We use regex to match the colon so that FileCheck won't think it is a check ; prefix. ; CHECK-NONEXISTENT-PREFIX: error: no check strings found with prefixes 'PREFIX1{{:}}', 'PREFIX2{{:}}'
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/check-multi-prefix-label.txt
// RUN: FileCheck -check-prefix=ONE -check-prefix=TWO -input-file %s %s foo bar ; ONE-LABEL: {{f}}oo ; TWO-NEXT: {{b}}ar
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/check-dag-multi-prefix.txt
; RUN: FileCheck -check-prefix=A -check-prefix=B -input-file %s %s add r10, r1, r2 add r11, r3, r4 mul r5, r10, r11 mul r11, r3, r4 mul r10, r1, r2 add r5, r10, r11 add r11, r3, r4 add r10, r1, r2 mul r5, r10, r11 ; B-DAG: add [[REG1:r[0-9]+]], r1, r2 ; B-DAG: add [[REG2:r[0-9]+]], r3, r4 ; B: mul r5, [[REG1]], [[REG2]] ; A-DAG: mul [[REG1:r[0-9]+]], r1, r2 ; A-DAG: mul [[REG2:r[0-9]+]], r3, r4 ; A: add r5, [[REG1]], [[REG2]] ; B-DAG: add [[REG1:r[0-9]+]], r1, r2 ; B-DAG: add [[REG2:r[0-9]+]], r3, r4 ; B-NOT: xor ; B-DAG: mul r5, [[REG1]], [[REG2]]
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/check-multiple-prefixes-substr.txt
// RUN: FileCheck -check-prefix=CHECKER -check-prefix=CHECK -input-file %s %s // RUN: FileCheck -check-prefix=CHECK -check-prefix=CHECKER -input-file %s %s foo ; CHECKER: fo{{o}}
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/check-empty.txt
// RUN: not FileCheck -check-prefix=FOO %s </dev/null 2>&1 | FileCheck -check-prefix=EMPTY-ERR %s // RUN: not FileCheck -check-prefix=NOFOO %s </dev/null 2>&1 | FileCheck -check-prefix=EMPTY-ERR %s // RUN: not FileCheck -check-prefix=FOO -allow-empty %s </dev/null 2>&1 | FileCheck -check-prefix=NO-EMPTY-ERR -check-prefix=NOT-FOUND %s // RUN: FileCheck -check-prefix=NOFOO -allow-empty %s </dev/null 2>&1 | FileCheck -allow-empty -check-prefix=NO-EMPTY-ERR %s ; FOO: foo ; NOFOO-NOT: foo ; EMPTY-ERR: FileCheck error: '-' is empty. ; NO-EMPTY-ERR-NOT: FileCheck error: '-' is empty. ; NOT-FOUND: error: expected string not found in input
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/check-a-b-has-b.txt
; RUN: FileCheck -check-prefix=A -check-prefix=B -input-file %s %s this is the string to be matched ; B-DAG: this is the string to be {{matched}}
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/implicit-check-not.txt
; RUN: sed 's#^;.*##' %s | FileCheck -check-prefix=CHECK-PASS -implicit-check-not=warning: %s ; RUN: sed 's#^;.*##' %s | not FileCheck -check-prefix=CHECK-FAIL1 -implicit-check-not=warning: %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR1 ; RUN: sed 's#^;.*##' %s | not FileCheck -check-prefix=CHECK-FAIL2 -implicit-check-not=warning: %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR2 ; RUN: sed 's#^;.*##' %s | not FileCheck -check-prefix=CHECK-FAIL3 -implicit-check-not=warning: %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR3 ; RUN: sed 's#^;.*##' %s | not FileCheck -check-prefix=CHECK-FAIL1 -implicit-check-not='{{aaa|bbb|ccc}}' %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR4 ; RUN: sed 's#^;.*##' %s | not FileCheck -check-prefix=CHECK-FAIL1 -implicit-check-not=aaa -implicit-check-not=bbb -implicit-check-not=ccc %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR5 ; RUN: sed 's#^;.*##' %s | not FileCheck -check-prefix=CHECK-FAIL2 -implicit-check-not=aaa -implicit-check-not=bbb -implicit-check-not=ccc %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR6 ; RUN: sed 's#^;.*##' %s | not FileCheck -check-prefix=CHECK-FAIL3 -implicit-check-not=aaa -implicit-check-not=bbb -implicit-check-not=ccc %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR7 warning: aaa ; CHECK-PASS: warning: aaa ; CHECK-ERROR1: error: CHECK-FAIL1-NOT: string occurred! ; CHECK-ERROR1: command line:1:22: note: CHECK-FAIL1-NOT: pattern specified here ; CHECK-ERROR1-NEXT: -implicit-check-not='warning:' ; CHECK-FAIL2: warning: aaa ; CHECK-FAIL3: warning: aaa ; CHECK-ERROR4: error: CHECK-FAIL1-NOT: string occurred! ; CHECK-ERROR4: command line:1:22: note: CHECK-FAIL1-NOT: pattern specified here ; CHECK-ERROR4-NEXT: {{-implicit-check-not='\{\{aaa\|bbb\|ccc\}\}'}} ; CHECK-ERROR5: error: CHECK-FAIL1-NOT: string occurred! ; CHECK-ERROR5: command line:1:22: note: CHECK-FAIL1-NOT: pattern specified here ; CHECK-ERROR5-NEXT: -implicit-check-not='aaa' warning: bbb ; CHECK-PASS: warning: bbb ; CHECK-FAIL1: warning: bbb ; CHECK-ERROR2: error: CHECK-FAIL2-NOT: string occurred! ; CHECK-ERROR2: command line:1:22: note: CHECK-FAIL2-NOT: pattern specified here ; CHECK-ERROR2-NEXT: -implicit-check-not='warning:' ; CHECK-FAIL3: warning: bbb ; CHECK-ERROR6: error: CHECK-FAIL2-NOT: string occurred! ; CHECK-ERROR6: command line:1:22: note: CHECK-FAIL2-NOT: pattern specified here ; CHECK-ERROR6-NEXT: -implicit-check-not='bbb' warning: ccc ; CHECK-PASS: warning: ccc ; CHECK-FAIL1: warning: ccc ; CHECK-FAIL2: warning: ccc ; CHECK-ERROR3: error: CHECK-FAIL3-NOT: string occurred! ; CHECK-ERROR3: command line:1:22: note: CHECK-FAIL3-NOT: pattern specified here ; CHECK-ERROR3-NEXT: -implicit-check-not='warning:' ; CHECK-ERROR7: error: CHECK-FAIL3-NOT: string occurred! ; CHECK-ERROR7: command line:1:22: note: CHECK-FAIL3-NOT: pattern specified here ; CHECK-ERROR7-NEXT: -implicit-check-not='ccc'
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/simple-var-capture.txt
// RUN: FileCheck -input-file %s %s op1 r1 op2 r1, r2 ; CHECK: op1 [[REG:r[0-9]]] ; CHECK-NEXT: op2 [[REG]] op3 r16, r18, r21 op4 r30, r18, r21 ; CHECK: op3 {{r[0-9]+}}, [[REGa:r[0-9]+]], [[REGb:r[0-9]+]] ; CHECK-NEXT: op4 {{r[0-9]+}}, [[REGa]], [[REGb]]
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/check-prefixes.txt
// RUN: FileCheck -check-prefix=ANOTHER-PREFIX -input-file %s %s // RUN: not FileCheck -check-prefix=PREFIX -input-file %s %s 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT-PREFIX %s foobar ; ANOTHER-PREFIX: foobar ; We use regex to match the colon so that FileCheck won't think it is a check ; prefix. ; CHECK-NONEXISTENT-PREFIX: error: no check strings found with prefix 'PREFIX{{:}}'
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/check-dag.txt
; RUN: FileCheck -input-file %s %s add r10, r1, r2 add r11, r3, r4 mul r5, r10, r11 mul r11, r3, r4 mul r10, r1, r2 add r5, r10, r11 add r11, r3, r4 add r10, r1, r2 mul r5, r10, r11 ; CHECK-DAG: add [[REG1:r[0-9]+]], r1, r2 ; CHECK-DAG: add [[REG2:r[0-9]+]], r3, r4 ; CHECK: mul r5, [[REG1]], [[REG2]] ; CHECK-DAG: mul [[REG1:r[0-9]+]], r1, r2 ; CHECK-DAG: mul [[REG2:r[0-9]+]], r3, r4 ; CHECK: add r5, [[REG1]], [[REG2]] ; CHECK-DAG: add [[REG1:r[0-9]+]], r1, r2 ; CHECK-DAG: add [[REG2:r[0-9]+]], r3, r4 ; CHECK-NOT: xor ; CHECK-DAG: mul r5, [[REG1]], [[REG2]]
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/validate-check-prefix.txt
// RUN: not FileCheck -check-prefix=A! -input-file %s %s 2>&1 | FileCheck -check-prefix=BAD_PREFIX %s // RUN: FileCheck -check-prefix=A1a-B_c -input-file %s %s // RUN: not FileCheck -check-prefix=REPEAT -check-prefix=REPEAT -input-file %s %s 2>&1 | FileCheck -check-prefix=BAD_PREFIX %s // RUN: not FileCheck -check-prefix=VALID -check-prefix=A! -input-file %s %s 2>&1 | FileCheck -check-prefix=BAD_PREFIX %s // RUN: not FileCheck -check-prefix= -input-file %s %s 2>&1 | FileCheck -check-prefix=BAD_PREFIX %s foobar ; A1a-B_c: foobar ; BAD_PREFIX: Supplied check-prefix is invalid! Prefixes must be unique and start with a letter and contain only alphanumeric characters, hyphens and underscores
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/check-label.txt
; RUN: FileCheck -input-file %s %s -check-prefix=CHECKOK ; RUN: not FileCheck -input-file %s %s -check-prefix=CHECKFAIL 2>&1 | FileCheck %s -check-prefix=CHECKERROR label0: a b label1: b c label2: a c ; CHECKOK-LABEL: {{^}}label0: ; CHECKOK: {{^}}a ; CHECKOK: {{^}}b ; CHECKOK-LABEL: {{^}}label1: ; CHECKOK: {{^}}b ; CHECKOK: {{^}}c ; CHECKOK-LABEL: {{^}}label2: ; CHECKOK: {{^}}a ; CHECKOK: {{^}}c ; CHECKFAIL-LABEL: {{^}}label0: ; CHECKFAIL: {{^}}a ; CHECKFAIL: {{^}}b ; CHECKFAIL: {{^}}c ; CHECKERROR: expected string not found in input ; CHECKERROR-NEXT: CHECKFAIL: {{[{][{]\^[}][}]}}c ; CHECKFAIL-LABEL: {{^}}label1: ; CHECKFAIL: {{^}}a ; CHECKFAIL: {{^}}b ; CHECKFAIL: {{^}}c ; CHECKERROR: expected string not found in input ; CHECKERROR-NEXT: CHECKFAIL: {{[{][{]\^[}][}]}}a ; CHECKFAIL-LABEL: {{^}}label2: ; CHECKFAIL: {{^}}a ; CHECKFAIL: {{^}}b ; CHECKFAIL: {{^}}c ; CHECKERROR: expected string not found in input ; CHECKERROR-NEXT: CHECKFAIL: {{[{][{]\^[}][}]}}b
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/separate-multi-prefix.txt
// RUN: not FileCheck -check-prefix=SOMEPREFIX -input-file %s %s // RUN: FileCheck -check-prefix=ANOTHER -input-file %s %s asdf ; SOMEPREFIX: {{t}}his_is_not_asdf ; ANOTHER: {{a}}sdf
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/check-dag-multi-prefix-2.txt
; RUN: FileCheck -check-prefix=A -input-file %s %s this should be matched ; B-DAG: foo ; A-DAG: {{this}} should be matched
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/two-checks-for-same-match.txt
// Check that two distinct CHECK lines won't match the same string // RUN: not FileCheck -input-file %s %s ; CHECK: {{a[0-9]b}} ; CHECK: {{a[0-9]b}} a2b
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/line-count.txt
; RUN: FileCheck -input-file %s %s 2 3 aaa 4 bbb 5 ccc 6 CHECK: [[@LINE-3]] {{a}}aa 7 CHECK: [[@LINE-3]] {{b}}bb 8 CHECK: [[@LINE-3]] {{c}}cc 9 foobar 10 CHECK: [[@LINE-1]] {{foo}}bar 11 12 arst CHECK: [[@LINE]] {{a}}rst 13 14
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/check-dag-xfails.txt
; RUN: not FileCheck -check-prefix=X1 -input-file %s %s ; RUN: not FileCheck -check-prefix=X2 -input-file %s %s ; RUN: not FileCheck -check-prefix=X3 -input-file %s %s ; RUN: not FileCheck -check-prefix=X4 -input-file %s %s ; RUN: not FileCheck -check-prefix=X5 -input-file %s %s ; RUN: not FileCheck -check-prefix=X6 -input-file %s %s __x1 add r10, r1, r2 add r11, r3, r4 mul r5, r10, r12 __x1 ; X1: __x1 ; X1-DAG: add [[REG1:r[0-9]+]], r1, r2 ; X1-DAG: add [[REG2:r[0-9]+]], r3, r4 ; X1: mul r5, [[REG1]], [[REG2]] ; X1: __x1 __x2 mul r11, r3, r4 mul r10, r1, r2 add r5, r11, r11 __x2 ; X2: __x2 ; X2-DAG: mul [[REG1:r[0-9]+]], r1, r2 ; X2-DAG: mul [[REG2:r[0-9]+]], r3, r4 ; X2: add r5, [[REG1]], [[REG2]] ; X2: __x2 __x3 add r11, r3, r4 add r12, r1, r2 mul r5, r10, r11 __x3 ; X3: __x3 ; X3-DAG: add [[REG1:r[0-9]+]], r1, r2 ; X3-DAG: add [[REG2:r[0-9]+]], r3, r4 ; X3-DAG: mul r5, [[REG1]], [[REG2]] ; X3: __x3 __x4 add r11, r3, r4 add r12, r1, r2 not mul r5, r12, r11 __x4 ; X4: __x4 ; X4-DAG: add [[REG1:r[0-9]+]], r1, r2 ; X4-DAG: add [[REG2:r[0-9]+]], r3, r4 ; X4-NOT: not ; X4-DAG: mul r5, [[REG1]], [[REG2]] ; X4: __x4 __x5 mul r5, r12, r11 add r11, r3, r4 add r12, r1, r2 not __x5 ; X5: __x5 ; X5-DAG: add [[REG1:r[0-9]+]], r1, r2 ; X5-DAG: add [[REG2:r[0-9]+]], r3, r4 ; X5-NOT: not ; X5-DAG: mul r5, [[REG1]], [[REG2]] ; X5: __x5 __x6 add r11, r3, r4 mul r6, r12, r11 add r12, r1, r2 mul r5, r12, r11 __x6 ; X6: __x6 ; X6-DAG: add [[REG1:r[0-9]+]], r1, r2 ; X6-DAG: add [[REG2:r[0-9]+]], r3, r4 ; X6-NOT: not ; X6-DAG: mul r5, [[REG1]], [[REG2]] ; X6-DAG: mul r6, [[REG1]], [[REG2]] ; X6: __x6
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/next-no-match.txt
// RUN: not FileCheck -input-file %s %s foo bar ; CHECK: foo baz ; CHECK-NEXT: baz
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/dos-style-eol.txt
// Test for using FileCheck on DOS style end-of-line // This test was deliberately committed with DOS style end of line. // Don't change line endings! // RUN: FileCheck -input-file %s %s // RUN: FileCheck --strict-whitespace -input-file %s %s LINE 1 ; CHECK: {{^}}LINE 1{{$}} LINE 2 ; CHECK: {{^}}LINE 2{{$}}
0
repos/DirectXShaderCompiler/test
repos/DirectXShaderCompiler/test/FileCheck/var-ref-same-line.txt
// Test for referencing a variable defined on the same line // RUN: FileCheck -input-file %s %s op1 r1, r2, r1 ; CHECK: op1 [[REG:r[0-9]+]], {{r[0-9]+}}, [[REG]] op3 r1, r2, r1, r2 ; CHECK: op3 [[REG1:r[0-9]+]], [[REG2:r[0-9]+]], [[REG1]], [[REG2]] op4 g1, g2, g1 ; Test that parens inside the regex don't confuse FileCheck ; CHECK: {{([a-z]+[0-9])+}} [[REG:g[0-9]+]], {{g[0-9]+}}, [[REG]]