summaryrefslogtreecommitdiffstats
path: root/test/MC
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-06-12 15:42:51 +0000
committerdim <dim@FreeBSD.org>2011-06-12 15:42:51 +0000
commitece02cd5829cea836e9365b0845a8ef042d17b0a (patch)
treeb3032e51d630e8070e9e08d6641648f195316a80 /test/MC
parent2b066988909948dc3d53d01760bc2d71d32f3feb (diff)
downloadFreeBSD-src-ece02cd5829cea836e9365b0845a8ef042d17b0a.zip
FreeBSD-src-ece02cd5829cea836e9365b0845a8ef042d17b0a.tar.gz
Vendor import of llvm trunk r132879:
http://llvm.org/svn/llvm-project/llvm/trunk@132879
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/ARM/arm_instructions.s6
-rw-r--r--test/MC/ARM/elf-movt.s6
-rw-r--r--test/MC/ARM/elf-thumbfunc-reloc.ll37
-rw-r--r--test/MC/ARM/elf-thumbfunc.s20
-rw-r--r--test/MC/ARM/simple-encoding.ll2
-rw-r--r--test/MC/ARM/thumb.s5
-rw-r--r--test/MC/ARM/thumb2.s2
-rw-r--r--test/MC/ARM/xscale-attributes.ll31
-rw-r--r--test/MC/AsmParser/directive_seh.s48
-rw-r--r--test/MC/AsmParser/directive_values.s7
-rw-r--r--test/MC/AsmParser/macro-args.s10
-rw-r--r--test/MC/COFF/seh-section.s37
-rw-r--r--test/MC/COFF/seh.s60
-rw-r--r--test/MC/Disassembler/ARM/arm-tests.txt3
-rw-r--r--test/MC/Disassembler/ARM/thumb-tests.txt3
-rw-r--r--test/MC/ELF/cfi-offset.s2
-rw-r--r--test/MC/ELF/cfi-sections.s38
-rw-r--r--test/MC/ELF/relocation-386.s8
-rw-r--r--test/MC/ELF/relocation.s7
-rw-r--r--test/MC/MachO/debug_frame.s38
-rw-r--r--test/MC/X86/x86-32-coverage.s5
-rw-r--r--test/MC/X86/x86-32.s12
22 files changed, 382 insertions, 5 deletions
diff --git a/test/MC/ARM/arm_instructions.s b/test/MC/ARM/arm_instructions.s
index 50a2b70..f789441 100644
--- a/test/MC/ARM/arm_instructions.s
+++ b/test/MC/ARM/arm_instructions.s
@@ -270,6 +270,9 @@
@ CHECK: msr cpsr_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1]
msr cpsr_fc, r0
+@ CHECK: msr cpsr_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1]
+ msr cpsr_all, r0
+
@ CHECK: msr cpsr_fsx, r0 @ encoding: [0x00,0xf0,0x2e,0xe1]
msr cpsr_fsx, r0
@@ -309,3 +312,6 @@
@ CHECK: ldrexd r0, r1, [r0] @ encoding: [0x9f,0x0f,0xb0,0xe1]
ldrexd r0, r1, [r0]
+@ CHECK: ssat16 r0, #7, r0 @ encoding: [0x30,0x0f,0xa6,0xe6]
+ ssat16 r0, #7, r0
+
diff --git a/test/MC/ARM/elf-movt.s b/test/MC/ARM/elf-movt.s
index 0fe7c50..18061f5 100644
--- a/test/MC/ARM/elf-movt.s
+++ b/test/MC/ARM/elf-movt.s
@@ -9,10 +9,10 @@
barf: @ @barf
@ BB#0: @ %entry
movw r0, :lower16:GOT-(.LPC0_2+8)
- movt r0, :upper16:GOT-(.LPC0_2+16)
+ movt r0, :upper16:GOT-(.LPC0_2+8)
.LPC0_2:
@ ASM: movw r0, :lower16:(GOT-(.LPC0_2+8))
-@ ASM-NEXT: movt r0, :upper16:(GOT-(.LPC0_2+16))
+@ ASM-NEXT: movt r0, :upper16:(GOT-(.LPC0_2+8))
@@ make sure that the text section fixups are sane too
@ OBJ: '.text'
@@ -25,7 +25,7 @@ barf: @ @barf
@ OBJ-NEXT: 'sh_info', 0x00000000
@ OBJ-NEXT: 'sh_addralign', 0x00000004
@ OBJ-NEXT: 'sh_entsize', 0x00000000
-@ OBJ-NEXT: '_section_data', 'f00f0fe3 ff0f4fe3'
+@ OBJ-NEXT: '_section_data', 'f00f0fe3 f40f4fe3'
@ OBJ: Relocation 0x00000000
@ OBJ-NEXT: 'r_offset', 0x00000000
diff --git a/test/MC/ARM/elf-thumbfunc-reloc.ll b/test/MC/ARM/elf-thumbfunc-reloc.ll
new file mode 100644
index 0000000..6fce4038
--- /dev/null
+++ b/test/MC/ARM/elf-thumbfunc-reloc.ll
@@ -0,0 +1,37 @@
+; RUN: llc %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic \
+; RUN: -filetype=obj -o - | elf-dump --dump-section-data | \
+; RUN: FileCheck %s
+
+; FIXME: This file needs to be in .s form!
+; We wanna test relocatable thumb function call,
+; but ARMAsmParser cannot handle "bl foo(PLT)" yet
+
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:32-n32"
+target triple = "thumbv7-none--gnueabi"
+
+define void @foo() nounwind {
+entry:
+ ret void
+}
+
+define void @bar() nounwind {
+entry:
+ call void @foo()
+ ret void
+}
+
+
+; make sure that bl 0 <foo> (fff7feff) is correctly encoded
+; CHECK: '_section_data', '70470000 2de90048 fff7feff bde80088'
+
+; Offset Info Type Sym.Value Sym. Name
+; 00000008 0000070a R_ARM_THM_CALL 00000001 foo
+; CHECK: Relocation 0x00000000
+; CHECK-NEXT: 'r_offset', 0x00000008
+; CHECK-NEXT: 'r_sym', 0x00000007
+; CHECK-NEXT: 'r_type', 0x0000000a
+
+; make sure foo is thumb function: bit 0 = 1
+; CHECK: Symbol 0x00000007
+; CHECK-NEXT: 'foo'
+; CHECK-NEXT: 'st_value', 0x00000001
diff --git a/test/MC/ARM/elf-thumbfunc.s b/test/MC/ARM/elf-thumbfunc.s
new file mode 100644
index 0000000..a1b3c31
--- /dev/null
+++ b/test/MC/ARM/elf-thumbfunc.s
@@ -0,0 +1,20 @@
+@@ test st_value bit 0 of thumb function
+@ RUN: llvm-mc %s -triple=thumbv7-linux-gnueabi -filetype=obj -o - | \
+@ RUN: elf-dump | FileCheck %s
+ .syntax unified
+ .text
+ .globl foo
+ .align 2
+ .type foo,%function
+ .code 16
+ .thumb_func
+foo:
+ bx lr
+
+@@ make sure foo is thumb function: bit 0 = 1 (st_value)
+@CHECK: Symbol 0x00000004
+@CHECK-NEXT: 'st_name', 0x00000001
+@CHECK-NEXT: 'st_value', 0x00000001
+@CHECK-NEXT: 'st_size', 0x00000000
+@CHECK-NEXT: 'st_bind', 0x00000001
+@CHECK-NEXT: 'st_type', 0x00000002
diff --git a/test/MC/ARM/simple-encoding.ll b/test/MC/ARM/simple-encoding.ll
index 7b581b3..3322803 100644
--- a/test/MC/ARM/simple-encoding.ll
+++ b/test/MC/ARM/simple-encoding.ll
@@ -1,4 +1,4 @@
-;RUN: llc -mtriple=armv7-apple-darwin -show-mc-encoding -disable-cgp-branch-opts < %s | FileCheck %s
+;RUN: llc -mtriple=armv7-apple-darwin -show-mc-encoding -disable-cgp-branch-opts -join-physregs < %s | FileCheck %s
;FIXME: Once the ARM integrated assembler is up and going, these sorts of tests
diff --git a/test/MC/ARM/thumb.s b/test/MC/ARM/thumb.s
index 342a390..55d9789 100644
--- a/test/MC/ARM/thumb.s
+++ b/test/MC/ARM/thumb.s
@@ -12,6 +12,8 @@
@ CHECK: blx r9 @ encoding: [0xc8,0x47]
blx r9
+@ CHECK: blx r10 @ encoding: [0xd0,0x47]
+ blx r10
@ CHECK: rev r2, r3 @ encoding: [0x1a,0xba]
@ CHECK: rev16 r3, r4 @ encoding: [0x63,0xba]
@@ -68,3 +70,6 @@
@ CHECK: cpsie aif @ encoding: [0x67,0xb6]
cpsie aif
+
+@ CHECK: mov r0, pc @ encoding: [0x78,0x46]
+ mov r0, pc
diff --git a/test/MC/ARM/thumb2.s b/test/MC/ARM/thumb2.s
index 5342b90..4e9d4e1 100644
--- a/test/MC/ARM/thumb2.s
+++ b/test/MC/ARM/thumb2.s
@@ -300,3 +300,5 @@
ldrex r0, [r0]
@ CHECK: ldrexd r0, r1, [r0] @ encoding: [0xd0,0xe8,0x7f,0x01]
ldrexd r0, r1, [r0]
+@ CHECK: ssat16 r0, #7, r0 @ encoding: [0x20,0xf3,0x06,0x00]
+ ssat16 r0, #7, r0
diff --git a/test/MC/ARM/xscale-attributes.ll b/test/MC/ARM/xscale-attributes.ll
new file mode 100644
index 0000000..e576278
--- /dev/null
+++ b/test/MC/ARM/xscale-attributes.ll
@@ -0,0 +1,31 @@
+; RUN: llc %s -mtriple=thumbv5-linux-gnueabi -mcpu=xscale -o - | \
+; RUN: FileCheck -check-prefix=ASM %s
+
+; RUN: llc %s -mtriple=thumbv5-linux-gnueabi -filetype=obj \
+; RUN: -mcpu=xscale -o - | elf-dump --dump-section-data | \
+; RUN: FileCheck -check-prefix=OBJ %s
+
+; FIXME: The OBJ test should be a .s to .o test and the ASM test should
+; be moved to test/CodeGen/ARM.
+
+define void @foo() nounwind {
+entry:
+ ret void
+}
+
+; ASM: .eabi_attribute 6, 5
+; ASM-NEXT: .eabi_attribute 8, 1
+; ASM-NEXT: .eabi_attribute 9, 1
+
+; OBJ: Section 0x00000004
+; OBJ-NEXT: 'sh_name', 0x0000000c
+; OBJ-NEXT: 'sh_type', 0x70000003
+; OBJ-NEXT: 'sh_flags', 0x00000000
+; OBJ-NEXT: 'sh_addr', 0x00000000
+; OBJ-NEXT: 'sh_offset', 0x00000038
+; OBJ-NEXT: 'sh_size', 0x00000020
+; OBJ-NEXT: 'sh_link', 0x00000000
+; OBJ-NEXT: 'sh_info', 0x00000000
+; OBJ-NEXT: 'sh_addralign', 0x00000001
+; OBJ-NEXT: 'sh_entsize', 0x00000000
+; OBJ-NEXT: '_section_data', '411f0000 00616561 62690001 15000000 06050801 09011401 15011703 18011901'
diff --git a/test/MC/AsmParser/directive_seh.s b/test/MC/AsmParser/directive_seh.s
new file mode 100644
index 0000000..98fc606
--- /dev/null
+++ b/test/MC/AsmParser/directive_seh.s
@@ -0,0 +1,48 @@
+# RUN: llvm-mc -triple x86_64-pc-win32 %s | FileCheck %s
+
+# CHECK: .seh_proc func
+# CHECK: .seh_pushframe @code
+# CHECK: .seh_stackalloc 24
+# CHECK: .seh_savereg 6, 16
+# CHECK: .seh_savexmm 8, 0
+# CHECK: .seh_pushreg 3
+# 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
+# CHECK: .seh_endproc
+
+ .text
+ .globl func
+ .def func; .scl 2; .type 32; .endef
+ .seh_proc func
+func:
+ .seh_pushframe @code
+ subq $24, %rsp
+ .seh_stackalloc 24
+ movq %rsi, 16(%rsp)
+ .seh_savereg %rsi, 16
+ movups %xmm8, (%rsp)
+ .seh_savexmm %xmm8, 0
+ pushq %rbx
+ .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
+ lea (%rbx), %rsp
+ pop %rbx
+ addq $24, %rsp
+ ret
+ .seh_endproc
diff --git a/test/MC/AsmParser/directive_values.s b/test/MC/AsmParser/directive_values.s
index 98259bd..6c79c38 100644
--- a/test/MC/AsmParser/directive_values.s
+++ b/test/MC/AsmParser/directive_values.s
@@ -56,3 +56,10 @@ TEST6:
# CHECK: .byte 35
# CHECK: .byte 9
# CHECK: .byte 10
+
+TEST7:
+ .byte 1, 2, 3, 4
+# CHECK: .byte 1
+# CHECK-NEXT: .byte 2
+# CHECK-NEXT: .byte 3
+# CHECK-NEXT: .byte 4
diff --git a/test/MC/AsmParser/macro-args.s b/test/MC/AsmParser/macro-args.s
new file mode 100644
index 0000000..808b6eb
--- /dev/null
+++ b/test/MC/AsmParser/macro-args.s
@@ -0,0 +1,10 @@
+// RUN: llvm-mc -triple x86_64-apple-darwin10 %s | FileCheck %s
+
+.macro GET var,re2g
+ movl \var@GOTOFF(%ebx),\re2g
+.endm
+
+
+GET is_sse, %eax
+
+// CHECK: movl is_sse@GOTOFF(%ebx), %eax
diff --git a/test/MC/COFF/seh-section.s b/test/MC/COFF/seh-section.s
new file mode 100644
index 0000000..802cba5
--- /dev/null
+++ b/test/MC/COFF/seh-section.s
@@ -0,0 +1,37 @@
+// This test ensures that, if the section containing a function has a suffix
+// (e.g. .text$foo), its unwind info section also has a suffix (.xdata$foo).
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s
+// XFAIL: *
+
+// CHECK: Name = .xdata$foo
+// CHECK-NEXT: VirtualSize
+// CHECK-NEXT: VirtualAddress
+// CHECK-NEXT: SizeOfRawData = 8
+// CHECK-NEXT: PointerToRawData
+// CHECK-NEXT: PointerToRelocations
+// CHECK-NEXT: PointerToLineNumbers
+// CHECK-NEXT: NumberOfRelocations = 0
+// CHECK-NEXT: NumberOfLineNumbers = 0
+// CHECK-NEXT: Charateristics
+// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
+// CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
+// CHECK-NEXT: IMAGE_SCN_MEM_READ
+// CHECK-NEXT: IMAGE_SCN_MEM_WRITE
+// CHECK-NEXT: SectionData
+// CHECK-NEXT: 01 05 02 00 05 50 04 02
+
+ .section .text$foo,"x"
+ .globl foo
+ .def foo; .scl 2; .type 32; .endef
+ .seh_proc foo
+foo:
+ subq $8, %rsp
+ .seh_stackalloc 8
+ pushq %rbp
+ .seh_pushreg %rbp
+ .seh_endprologue
+ popq %rbp
+ addq $8, %rsp
+ ret
+ .seh_endproc
+
diff --git a/test/MC/COFF/seh.s b/test/MC/COFF/seh.s
new file mode 100644
index 0000000..8cafcb3
--- /dev/null
+++ b/test/MC/COFF/seh.s
@@ -0,0 +1,60 @@
+// This test checks that the SEH directives emit the correct unwind data.
+// RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | coff-dump.py | FileCheck %s
+
+// CHECK: Name = .xdata
+// CHECK-NEXT: VirtualSize
+// CHECK-NEXT: VirtualAddress
+// CHECK-NEXT: SizeOfRawData = 52
+// CHECK-NEXT: PointerToRawData
+// CHECK-NEXT: PointerToRelocations
+// CHECK-NEXT: PointerToLineNumbers
+// CHECK-NEXT: NumberOfRelocations = 4
+// CHECK-NEXT: NumberOfLineNumbers = 0
+// CHECK-NEXT: Charateristics
+// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
+// CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
+// CHECK-NEXT: IMAGE_SCN_MEM_READ
+// CHECK-NEXT: IMAGE_SCN_MEM_WRITE
+// CHECK-NEXT: SectionData
+// CHECK-NEXT: 09 12 08 03 00 03 0F 30 - 0E 88 00 00 09 64 02 00
+// CHECK-NEXT: 04 22 00 1A 00 00 00 00 - 00 00 00 00 21 00 00 00
+// CHECK-NEXT: 00 00 00 00 1B 00 00 00 - 00 00 00 00 01 00 00 00
+// CHECK-NEXT: 00 00 00 00
+
+ .text
+ .globl func
+ .def func; .scl 2; .type 32; .endef
+ .seh_proc func
+func:
+ .seh_pushframe @code
+ subq $24, %rsp
+ .seh_stackalloc 24
+ movq %rsi, 16(%rsp)
+ .seh_savereg %rsi, 16
+ movups %xmm8, (%rsp)
+ .seh_savexmm %xmm8, 0
+ pushq %rbx
+ .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
+ lea (%rbx), %rsp
+ pop %rbx
+ addq $24, %rsp
+ ret
+ .seh_endproc
+
+// Test emission of small functions.
+ .globl smallFunc
+ .def smallFunc; .scl 2; .type 32; .endef
+ .seh_proc smallFunc
+smallFunc:
+ ret
+ .seh_endproc
diff --git a/test/MC/Disassembler/ARM/arm-tests.txt b/test/MC/Disassembler/ARM/arm-tests.txt
index ade2952..ca072c7 100644
--- a/test/MC/Disassembler/ARM/arm-tests.txt
+++ b/test/MC/Disassembler/ARM/arm-tests.txt
@@ -164,6 +164,9 @@
# CHECK: bx r12
0x1c 0xff 0x2f 0xe1
+# CHECK: bxeq r5
+0x15 0xff 0x2f 0x01
+
# CHECK: uqadd16mi r6, r11, r8
0x18 0x60 0x6b 0x46
diff --git a/test/MC/Disassembler/ARM/thumb-tests.txt b/test/MC/Disassembler/ARM/thumb-tests.txt
index 774dbe4..895a5bb 100644
--- a/test/MC/Disassembler/ARM/thumb-tests.txt
+++ b/test/MC/Disassembler/ARM/thumb-tests.txt
@@ -262,3 +262,6 @@
# CHECK: nop.w
0xaf 0xf3 0x00 0x80
+
+# CHECK: bne #24
+0x0c 0xd1
diff --git a/test/MC/ELF/cfi-offset.s b/test/MC/ELF/cfi-offset.s
index 963a76c..f54dec0 100644
--- a/test/MC/ELF/cfi-offset.s
+++ b/test/MC/ELF/cfi-offset.s
@@ -3,7 +3,7 @@
f:
.cfi_startproc
nop
- .cfi_offset %ebp, -16
+ .cfi_offset %rbp, -16
nop
.cfi_endproc
diff --git a/test/MC/ELF/cfi-sections.s b/test/MC/ELF/cfi-sections.s
new file mode 100644
index 0000000..a73f3a9
--- /dev/null
+++ b/test/MC/ELF/cfi-sections.s
@@ -0,0 +1,38 @@
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_64 %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_32 %s
+
+.cfi_sections .debug_frame
+
+f1:
+ .cfi_startproc
+ nop
+ .cfi_endproc
+
+f2:
+ .cfi_startproc
+ nop
+ .cfi_endproc
+
+// ELF_64: (('sh_name', 0x00000011) # '.debug_frame'
+// ELF_64-NEXT: ('sh_type', 0x00000001)
+// ELF_64-NEXT: ('sh_flags', 0x00000000)
+// ELF_64-NEXT: ('sh_addr', 0x00000000)
+// ELF_64-NEXT: ('sh_offset', 0x00000048)
+// ELF_64-NEXT: ('sh_size', 0x00000048)
+// ELF_64-NEXT: ('sh_link', 0x00000000)
+// ELF_64-NEXT: ('sh_info', 0x00000000)
+// ELF_64-NEXT: ('sh_addralign', 0x00000008)
+// ELF_64-NEXT: ('sh_entsize', 0x00000000)
+// ELF_64-NEXT: ('_section_data', '14000000 ffffffff 01000178 100c0708 90010000 00000000 14000000 00000000 00000000 00000000 01000000 00000000 14000000 00000000 00000000 00000000 01000000 00000000')
+
+// ELF_32: (('sh_name', 0x00000010) # '.debug_frame'
+// ELF_32-NEXT: ('sh_type', 0x00000001)
+// ELF_32-NEXT: ('sh_flags', 0x00000000)
+// ELF_32-NEXT: ('sh_addr', 0x00000000)
+// ELF_32-NEXT: ('sh_offset', 0x00000038)
+// ELF_32-NEXT: ('sh_size', 0x00000034)
+// ELF_32-NEXT: ('sh_link', 0x00000000)
+// ELF_32-NEXT: ('sh_info', 0x00000000)
+// ELF_32-NEXT: ('sh_addralign', 0x00000004)
+// ELF_32-NEXT: ('sh_entsize', 0x00000000)
+// ELF_32-NEXT: ('_section_data', '10000000 ffffffff 0100017c 080c0404 88010000 0c000000 00000000 00000000 01000000 0c000000 00000000 01000000 01000000')
diff --git a/test/MC/ELF/relocation-386.s b/test/MC/ELF/relocation-386.s
index f7b20b5..25f3450 100644
--- a/test/MC/ELF/relocation-386.s
+++ b/test/MC/ELF/relocation-386.s
@@ -153,6 +153,13 @@
// CHECK-NEXT: ('r_sym',
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ),
+// Relocation 24 (foo@GOTTPOFF(%edx)) is of type R_386_TLS_IE_32 and uses the
+// symbol
+// CHECK-NEXT: Relocation 0x00000018
+// CHECK-NEXT: (('r_offset', 0x0000008e)
+// CHECK-NEXT: ('r_sym', 0x0000000d)
+// CHECK-NEXT: ('r_type', 0x00000021)
+// CHECK-NEXT: ),
// Section 4 is bss
// CHECK: # Section 0x00000004
@@ -217,6 +224,7 @@ bar2:
movl zed@TPOFF(%eax), %eax
movl zed@DTPOFF(%eax), %eax
pushl $bar
+ addl foo@GOTTPOFF(%edx), %eax
.section zedsec,"awT",@progbits
zed:
diff --git a/test/MC/ELF/relocation.s b/test/MC/ELF/relocation.s
index 4df09e1..2760232 100644
--- a/test/MC/ELF/relocation.s
+++ b/test/MC/ELF/relocation.s
@@ -17,6 +17,7 @@ bar:
pushq $bar
movq foo(%rip), %rdx
leaq foo-bar(%r14),%r14
+ addq $bar,%rax # R_X86_64_32S
// CHECK: # Section 0x00000001
@@ -106,6 +107,12 @@ bar:
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000005c)
+// CHECK: # Relocation 0x0000000e
+// CHECK-NEXT: (('r_offset', 0x00000063)
+// CHECK-NEXT: ('r_sym', 0x00000002)
+// CHECK-NEXT: ('r_type', 0x0000000b)
+// CHECK-NEXT: ('r_addend', 0x00000000)
+
// CHECK: # Symbol 0x00000002
// CHECK: (('st_name', 0x00000000) # ''
// CHECK: ('st_bind', 0x00000000)
diff --git a/test/MC/MachO/debug_frame.s b/test/MC/MachO/debug_frame.s
new file mode 100644
index 0000000..47264ef
--- /dev/null
+++ b/test/MC/MachO/debug_frame.s
@@ -0,0 +1,38 @@
+// RUN: llvm-mc -triple i386-apple-darwin %s -filetype=obj -o - | macho-dump | FileCheck %s
+
+// Check that we don't produce a relocation for the CIE pointer and therefore
+// we have only one relocation in __debug_frame.
+
+ .section __TEXT,__text,regular,pure_instructions
+ .globl _f
+ .align 4, 0x90
+_f: ## @f
+Ltmp0:
+ .cfi_startproc
+## BB#0: ## %entry
+ movl $42, %eax
+ ret
+Ltmp1:
+ .cfi_endproc
+Leh_func_end0:
+
+ .cfi_sections .debug_frame
+Ltext_end:
+
+// CHECK: (('section_name', '__debug_frame\x00\x00\x00')
+// CHECK-NEXT: ('segment_name', '__DWARF\x00\x00\x00\x00\x00\x00\x00\x00\x00')
+// CHECK-NEXT: ('address', 8)
+// CHECK-NEXT: ('size', 36)
+// CHECK-NEXT: ('offset', 332)
+// CHECK-NEXT: ('alignment', 2)
+// CHECK-NEXT: ('reloc_offset', 368)
+// CHECK-NEXT: ('num_reloc', 1)
+// CHECK-NEXT: ('flags', 0x2000000)
+// CHECK-NEXT: ('reserved1', 0)
+// CHECK-NEXT: ('reserved2', 0)
+// CHECK-NEXT: ),
+// CHECK-NEXT: ('_relocations', [
+// CHECK-NEXT: # Relocation 0
+// CHECK-NEXT: (('word-0', 0x1c),
+// CHECK-NEXT: ('word-1', 0x4000001)),
+// CHECK-NEXT: ])
diff --git a/test/MC/X86/x86-32-coverage.s b/test/MC/X86/x86-32-coverage.s
index 4ac7efd..d2dd78d 100644
--- a/test/MC/X86/x86-32-coverage.s
+++ b/test/MC/X86/x86-32-coverage.s
@@ -19570,3 +19570,8 @@
// CHECK: aeskeygenassist $125, (%edx,%eax,4), %xmm2
aeskeygenassist $125, (%edx,%eax,4), %xmm2
+
+// CHECK: blendvps (%rax), %xmm1 # encoding: [0x66,0x0f,0x38,0x14,0x08]
+ blendvps (%rax), %xmm1
+// CHECK: blendvps %xmm2, %xmm1 # encoding: [0x66,0x0f,0x38,0x14,0xca]
+ blendvps %xmm2, %xmm1
diff --git a/test/MC/X86/x86-32.s b/test/MC/X86/x86-32.s
index 28900bb..6017880 100644
--- a/test/MC/X86/x86-32.s
+++ b/test/MC/X86/x86-32.s
@@ -934,3 +934,15 @@ pshufw $90, %mm4, %mm0
// CHECK: strl
// CHECK: encoding: [0x0f,0x00,0xc8]
str %eax
+
+
+// PR9378
+// CHECK: fsubp
+// CHECK: encoding: [0xde,0xe1]
+fsubp %st,%st(1)
+
+// PR9164
+// CHECK: fsubp %st(2)
+// CHECK: encoding: [0xde,0xe2]
+fsubp %st, %st(2)
+
OpenPOWER on IntegriCloud