Add more tests for non-PIC calls on x86-64.

This commit is contained in:
Dan Gohman
2018-04-17 22:12:41 -07:00
parent bf597b7abf
commit d3e76b8a51
2 changed files with 16 additions and 1 deletions

View File

@@ -477,7 +477,7 @@ ebb0:
; Colocated functions. ; Colocated functions.
; asm: call bar ; asm: call bar
; call fn1() ; bin: e8 PCRel4(%bar-4) 00000000 call fn1() ; bin: e8 PCRel4(%bar-4) 00000000
; asm: lea 0x0(%rip), %rcx ; asm: lea 0x0(%rip), %rcx
[-,%rcx] v400 = func_addr.i64 fn1 ; bin: 48 8d 0d PCRel4(%bar-4) 00000000 [-,%rcx] v400 = func_addr.i64 fn1 ; bin: 48 8d 0d PCRel4(%bar-4) 00000000

View File

@@ -0,0 +1,15 @@
; Test legalization of a non-colocated call in 64-bit non-PIC mode.
test legalizer
set is_64bit
set is_compressed
isa x86 haswell
function %call() {
fn0 = %foo()
ebb0:
call fn0()
return
}
; check: v0 = func_addr.i64 fn0
; nextln: call_indirect sig0, v0()