forked from GPUOpen-Drivers/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged master:e9df9028a7ca into amd-gfx:dfd5c08faba1
Local branch amd-gfx dfd5c08 Merged master:09be7623e4e8 into amd-gfx:adbf4b157df9 Remote branch master e9df902 [x86] add no 'unwind' to reduce test noise; NFC
- Loading branch information
Showing
52 changed files
with
927 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// REQUIRES: x86 | ||
// RUN: split-file %s %t.dir | ||
// RUN: llvm-mc -filetype=obj -triple=i686-win32-gnu %t.dir/main.s -o %t.main.obj | ||
// RUN: llvm-mc -filetype=obj -triple=i686-win32-gnu %t.dir/other.s -o %t.other.obj | ||
|
||
// RUN: lld-link -out:%t.exe %t.main.obj %t.other.obj -entry:entry -subsystem:console -debug:symtab -safeseh:no -wrap:foo -wrap:nosuchsym | ||
// RUN: llvm-objdump -d --print-imm-hex %t.exe | FileCheck %s | ||
|
||
// CHECK: <_entry>: | ||
// CHECK-NEXT: movl $0x11010, %edx | ||
// CHECK-NEXT: movl $0x11010, %edx | ||
// CHECK-NEXT: movl $0x11000, %edx | ||
|
||
// RUN: llvm-readobj --symbols %t.exe > %t.dump | ||
// RUN: FileCheck --check-prefix=SYM1 %s < %t.dump | ||
// RUN: FileCheck --check-prefix=SYM2 %s < %t.dump | ||
// RUN: FileCheck --check-prefix=SYM3 %s < %t.dump | ||
|
||
// _foo = 0xffc11000 = 4290842624 | ||
// ___wrap_foo = ffc11010 = 4290842640 | ||
// SYM1: Name: _foo | ||
// SYM1-NEXT: Value: 4290842624 | ||
// SYM1-NEXT: Section: IMAGE_SYM_ABSOLUTE | ||
// SYM1-NEXT: BaseType: Null | ||
// SYM1-NEXT: ComplexType: Null | ||
// SYM1-NEXT: StorageClass: External | ||
// SYM2: Name: ___wrap_foo | ||
// SYM2-NEXT: Value: 4290842640 | ||
// SYM2-NEXT: Section: IMAGE_SYM_ABSOLUTE | ||
// SYM2-NEXT: BaseType: Null | ||
// SYM2-NEXT: ComplexType: Null | ||
// SYM2-NEXT: StorageClass: External | ||
// SYM3-NOT: Name: ___real_foo | ||
|
||
#--- main.s | ||
.global _entry | ||
_entry: | ||
movl $_foo, %edx | ||
movl $___wrap_foo, %edx | ||
movl $___real_foo, %edx | ||
|
||
#--- other.s | ||
.global _foo | ||
.global ___wrap_foo | ||
.global ___real_foo | ||
|
||
_foo = 0x11000 | ||
___wrap_foo = 0x11010 | ||
___real_foo = 0x11020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// REQUIRES: x86 | ||
|
||
// Check that wrapping works when the wrapped symbol is imported from a | ||
// different DLL. | ||
|
||
// RUN: split-file %s %t.dir | ||
// RUN: llc %t.dir/main.ll -o %t.main.obj --filetype=obj | ||
// RUN: llvm-as %t.dir/main.ll -o %t.main.bc | ||
// RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/lib.s -o %t.lib.obj | ||
|
||
// RUN: lld-link -dll -out:%t.lib.dll %t.lib.obj -noentry -export:func -implib:%t.lib.lib | ||
// RUN: lld-link -out:%t.exe %t.main.obj %t.lib.lib -entry:entry -subsystem:console -wrap:func | ||
// RUN: lld-link -out:%t.exe %t.main.bc %t.lib.lib -entry:entry -subsystem:console -wrap:func | ||
|
||
#--- main.ll | ||
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" | ||
target triple = "x86_64-w64-windows-gnu" | ||
|
||
declare void @func() | ||
|
||
define void @entry() { | ||
call void @func() | ||
ret void | ||
} | ||
|
||
declare void @__real_func() | ||
|
||
define void @__wrap_func() { | ||
call void @__real_func() | ||
ret void | ||
} | ||
|
||
#--- lib.s | ||
.global func | ||
func: | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
; REQUIRES: x86 | ||
; LTO | ||
; RUN: llvm-as %s -o %t.obj | ||
; RUN: lld-link -out:%t.exe %t.obj -entry:entry -subsystem:console -wrap:bar -debug:symtab -lldsavetemps | ||
; RUN: cat %t.exe.resolution.txt | FileCheck -check-prefix=RESOLS %s | ||
|
||
; ThinLTO | ||
; RUN: opt -module-summary %s -o %t.obj | ||
; RUN: lld-link -out:%t.exe %t.obj -entry:entry -subsystem:console -wrap:bar -debug:symtab -lldsavetemps | ||
; RUN: cat %t.exe.resolution.txt | FileCheck -check-prefix=RESOLS %s | ||
|
||
; Make sure that the 'r' (linker redefined) bit is set for bar and __real_bar | ||
; in the resolutions file. The calls to bar and __real_bar will be routed to | ||
; __wrap_bar and bar, respectively. So they cannot be inlined. | ||
; RESOLS: ,bar,pxr{{$}} | ||
; RESOLS: ,__real_bar,xr{{$}} | ||
; RESOLS: ,__wrap_bar,px{{$}} | ||
|
||
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" | ||
target triple = "x86_64-w64-windows-gnu" | ||
|
||
define void @bar() { | ||
ret void | ||
} | ||
|
||
define void @entry() { | ||
call void @bar() | ||
ret void | ||
} | ||
|
||
declare void @__real_bar() | ||
|
||
define void @__wrap_bar() { | ||
call void @__real_bar() | ||
ret void | ||
} |
Oops, something went wrong.