2020-05-21 12:35:18 +08:00
|
|
|
; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o
|
2019-02-21 07:19:31 +08:00
|
|
|
; RUN: llc -filetype=obj %s -o %t.main.o
|
|
|
|
; RUN: wasm-ld --export=ret32 -o %t.wasm %t.main.o %t.ret32.o
|
|
|
|
; RUN: obj2yaml %t.wasm | FileCheck %s
|
|
|
|
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
|
|
|
|
declare i32 @ret32(i32)
|
|
|
|
|
|
|
|
define void @_start() {
|
|
|
|
entry:
|
|
|
|
%call1 = call i32 @ret32(i32 0)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; CHECK: - Type: EXPORT
|
|
|
|
; CHECK: - Name: ret32
|
|
|
|
; CHECK-NEXT: Kind: FUNCTION
|
2019-03-02 06:35:47 +08:00
|
|
|
; CHECK-NEXT: Index: 2
|
2019-02-21 07:19:31 +08:00
|
|
|
|
|
|
|
; CHECK: - Type: CUSTOM
|
|
|
|
; CHECK-NEXT: Name: name
|
|
|
|
; CHECK-NEXT: FunctionNames:
|
|
|
|
; CHECK-NEXT: - Index: 0
|
2020-01-17 06:36:44 +08:00
|
|
|
; CHECK-NEXT: Name: 'signature_mismatch:ret32'
|
2019-03-02 06:35:47 +08:00
|
|
|
; CHECK-NEXT: - Index: 1
|
2019-02-21 07:19:31 +08:00
|
|
|
; CHECK-NEXT: Name: _start
|
2019-03-02 06:35:47 +08:00
|
|
|
; CHECK-NEXT: - Index: 2
|
2019-02-21 07:19:31 +08:00
|
|
|
; CHECK-NEXT: Name: ret32
|
2020-11-19 13:38:23 +08:00
|
|
|
; CHECK-NEXT: GlobalNames:
|
|
|
|
; CHECK-NEXT: - Index: 0
|
|
|
|
; CHECK-NEXT: Name: __stack_pointer
|
2019-02-21 07:19:31 +08:00
|
|
|
; CHECK-NEXT: ...
|