mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
2769a48f27
Summary: Also changes the wasm YAML format to reflect the possibility of having multiple return types and to put the returns after the params for consistency with the binary encoding. Reviewers: aheejin, sbc100 Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, arphaman, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69156 llvm-svn: 375283
72 lines
2.0 KiB
YAML
72 lines
2.0 KiB
YAML
# RUN: yaml2obj %s | obj2yaml | FileCheck %s
|
|
--- !WASM
|
|
FileHeader:
|
|
Version: 0x00000001
|
|
Sections:
|
|
- Type: TYPE
|
|
Signatures:
|
|
- Index: 0
|
|
ParamTypes:
|
|
- I32
|
|
ReturnTypes:
|
|
- I32
|
|
- Type: IMPORT
|
|
Imports:
|
|
- Module: foo
|
|
Field: bar
|
|
Kind: FUNCTION
|
|
SigIndex: 0
|
|
- Type: DATA
|
|
Segments:
|
|
- InitFlags: 0
|
|
Offset:
|
|
Opcode: I32_CONST
|
|
Value: 4
|
|
Content: '10001000'
|
|
- InitFlags: 0
|
|
Offset:
|
|
Opcode: I32_CONST
|
|
Value: 8
|
|
Content: '11110000'
|
|
- Type: CUSTOM
|
|
Name: linking
|
|
Version: 2
|
|
SymbolTable:
|
|
- Index: 0
|
|
Kind: FUNCTION
|
|
Name: bar
|
|
Flags: [ BINDING_WEAK, UNDEFINED ]
|
|
Function: 0
|
|
SegmentInfo:
|
|
- Index: 0
|
|
Alignment: 4
|
|
Flags: [ ]
|
|
Name: mydata
|
|
- Index: 1
|
|
Alignment: 2
|
|
Flags: [ ]
|
|
Name: moredata
|
|
InitFunctions:
|
|
- Priority: 1
|
|
Symbol: 0
|
|
...
|
|
# CHECK: SymbolTable:
|
|
# CHECK-NEXT: - Index: 0
|
|
# CHECK-NEXT: Kind: FUNCTION
|
|
# CHECK-NEXT: Name: bar
|
|
# CHECK-NEXT: Flags: [ BINDING_WEAK, UNDEFINED ]
|
|
# CHECK-NEXT: Function: 0
|
|
# CHECK-NEXT: SegmentInfo:
|
|
# CHECK-NEXT: - Index: 0
|
|
# CHECK-NEXT: Name: mydata
|
|
# CHECK-NEXT: Alignment: 4
|
|
# CHECK-NEXT: Flags: [ ]
|
|
# CHECK-NEXT: - Index: 1
|
|
# CHECK-NEXT: Name: moredata
|
|
# CHECK-NEXT: Alignment: 2
|
|
# CHECK-NEXT: Flags: [ ]
|
|
# CHECK-NEXT: InitFunctions:
|
|
# CHECK-NEXT: - Priority: 1
|
|
# CHECK-NEXT: Symbol: 0
|
|
# CHECK-NEXT: ...
|