diff options
Diffstat (limited to 'test/MC/AsmParser')
-rw-r--r-- | test/MC/AsmParser/directive_space.s | 5 | ||||
-rw-r--r-- | test/MC/AsmParser/dot-symbol.s | 12 | ||||
-rw-r--r-- | test/MC/AsmParser/exprs-invalid.s | 19 | ||||
-rw-r--r-- | test/MC/AsmParser/floating-literals.s | 9 | ||||
-rw-r--r-- | test/MC/AsmParser/rename.s | 6 | ||||
-rw-r--r-- | test/MC/AsmParser/section.s | 10 |
6 files changed, 43 insertions, 18 deletions
diff --git a/test/MC/AsmParser/directive_space.s b/test/MC/AsmParser/directive_space.s index e6353a4..fc5aeb4 100644 --- a/test/MC/AsmParser/directive_space.s +++ b/test/MC/AsmParser/directive_space.s @@ -9,3 +9,8 @@ TEST0: # CHECK: .space 2,3 TEST1: .space 2, 3 + +# CHECK: TEST2: +# CHECK: .space 1 +TEST2: + .skip 1 diff --git a/test/MC/AsmParser/dot-symbol.s b/test/MC/AsmParser/dot-symbol.s new file mode 100644 index 0000000..4a38a40 --- /dev/null +++ b/test/MC/AsmParser/dot-symbol.s @@ -0,0 +1,12 @@ +# Historically 'as' treats '.' as a reference to the current location in +# arbitrary contects. 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: assignment to pseudo-symbol '.' is unsupported (use '.space' or '.org'). +. = . + 8 + +# CHECK: invalid use of pseudo-symbol '.' as a label +.: + .long 0 diff --git a/test/MC/AsmParser/exprs-invalid.s b/test/MC/AsmParser/exprs-invalid.s index 5358fc5..dc27d80 100644 --- a/test/MC/AsmParser/exprs-invalid.s +++ b/test/MC/AsmParser/exprs-invalid.s @@ -1,13 +1,8 @@ -// RUN: not llvm-mc -triple i386-unknown-unknown %s 2> %t -// RUN: FileCheck -input-file %t %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 -// Currently XFAIL'ed, since the front-end isn't validating this. Figure out the -// right resolution. -// -// XFAIL: * - - .text -a: - .data -// CHECK: expected relocatable expression - .long -(0 + a) +// CHECK-ERRORS: error: invalid hexadecimal number +.long 80+0xzz diff --git a/test/MC/AsmParser/floating-literals.s b/test/MC/AsmParser/floating-literals.s index bd122a8..d44bb98 100644 --- a/test/MC/AsmParser/floating-literals.s +++ b/test/MC/AsmParser/floating-literals.s @@ -6,6 +6,15 @@ # 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 diff --git a/test/MC/AsmParser/rename.s b/test/MC/AsmParser/rename.s index 64ca515..934cee8 100644 --- a/test/MC/AsmParser/rename.s +++ b/test/MC/AsmParser/rename.s @@ -1,10 +1,14 @@ // RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s .size bar, . - bar +.Ltmp01: + .size foo, .Ltmp01 - foo .Ltmp0: - .size foo, .Ltmp0 - foo + .size qux, .Ltmp0 - qux // CHECK: .Ltmp0: // CHECK: .size bar, .Ltmp0-bar // CHECK: .Ltmp01 // CHECK: .size foo, .Ltmp01-foo +// CHECK: .Ltmp02 +// CHECK: .size qux, .Ltmp02-qux diff --git a/test/MC/AsmParser/section.s b/test/MC/AsmParser/section.s index 414fc6d..5abacc7 100644 --- a/test/MC/AsmParser/section.s +++ b/test/MC/AsmParser/section.s @@ -45,7 +45,7 @@ .previous .byte 1 .previous -# CHECK: (('sh_name', 0x00000012) # 'test1' +# CHECK: (('sh_name', 0x00000044) # 'test1' # CHECK-NEXT: ('sh_type', 0x00000001) # CHECK-NEXT: ('sh_flags', 0x00000000) # CHECK-NEXT: ('sh_addr', 0x00000000) @@ -57,7 +57,7 @@ # CHECK-NEXT: ('sh_entsize', 0x00000000) # CHECK-NEXT: ('_section_data', '01010101 010101') # CHECK-NEXT: ), -# CHECK: (('sh_name', 0x00000018) # 'test2' +# CHECK: (('sh_name', 0x0000003e) # 'test2' # CHECK-NEXT: ('sh_type', 0x00000001) # CHECK-NEXT: ('sh_flags', 0x00000000) # CHECK-NEXT: ('sh_addr', 0x00000000) @@ -69,7 +69,7 @@ # CHECK-NEXT: ('sh_entsize', 0x00000000) # CHECK-NEXT: ('_section_data', '02020202 0202') # CHECK-NEXT: ), -# CHECK: (('sh_name', 0x0000001e) # 'test3' +# CHECK: (('sh_name', 0x00000038) # 'test3' # CHECK-NEXT: ('sh_type', 0x00000001) # CHECK-NEXT: ('sh_flags', 0x00000000) # CHECK-NEXT: ('sh_addr', 0x00000000) @@ -81,7 +81,7 @@ # CHECK-NEXT: ('sh_entsize', 0x00000000) # CHECK-NEXT: ('_section_data', '03030303 03') # CHECK-NEXT: ), -# CHECK: (('sh_name', 0x00000024) # 'test4' +# CHECK: (('sh_name', 0x00000032) # 'test4' # CHECK-NEXT: ('sh_type', 0x00000001) # CHECK-NEXT: ('sh_flags', 0x00000000) # CHECK-NEXT: ('sh_addr', 0x00000000) @@ -93,7 +93,7 @@ # CHECK-NEXT: ('sh_entsize', 0x00000000) # CHECK-NEXT: ('_section_data', '040404') # CHECK-NEXT: ), -# CHECK: (('sh_name', 0x0000002a) # 'test5' +# CHECK: (('sh_name', 0x0000002c) # 'test5' # CHECK-NEXT: ('sh_type', 0x00000001) # CHECK-NEXT: ('sh_flags', 0x00000000) # CHECK-NEXT: ('sh_addr', 0x00000000) |