llvm.org GIT mirror llvm / 0f48414
[WebAssembly] Update test cases after FixFunctionBitcasts Summary: This updates generated binaries and corresponding test cases up to date after applying FixFunctionBitcasts pass. Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54070 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346286 91177308-0d34-0410-b5e6-96231b3b80d8 Heejin Ahn 1 year, 6 months ago
10 changed file(s) with 33 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
6060
6161
6262 WASM: 00000000 d .L.str
63 WASM-NEXT: 00000003 t .LSomeOtherFunction_bitcast
6364 WASM-NEXT: U SomeOtherFunction
6465 WASM-NEXT: 00000002 T main
6566 WASM-NEXT: U puts
33 CHECK-NEXT: 00000002 g F CODE main
44 CHECK-NEXT: 00000000 l DATA .L.str
55 CHECK-NEXT: 00000000 g F *UND* puts
6 CHECK-NEXT: 00000003 l F CODE .LSomeOtherFunction_bitcast
67 CHECK-NEXT: 00000000 g F *UND* SomeOtherFunction
78 CHECK-NEXT: 00000010 g DATA var
11
22 # CHECK: Sections:
33 # CHECK-NEXT: Idx Name Size Address Type
4 # CHECK-NEXT: 0 TYPE 0000000e 0000000000000000
4 # CHECK-NEXT: 0 TYPE 00000011 0000000000000000
55 # CHECK-NEXT: 1 IMPORT 0000005d 0000000000000000
6 # CHECK-NEXT: 2 FUNCTION 00000002 0000000000000000
7 # CHECK-NEXT: 3 CODE 00000019 0000000000000000 TEXT
6 # CHECK-NEXT: 2 FUNCTION 00000003 0000000000000000
7 # CHECK-NEXT: 3 CODE 00000024 0000000000000000 TEXT
88 # CHECK-NEXT: 4 DATA 0000001c 0000000000000000 DATA
9 # CHECK-NEXT: 5 linking 00000051 0000000000000000
10 # CHECK-NEXT: 6 reloc.CODE 0000000c 0000000000000000
9 # CHECK-NEXT: 5 linking 0000006d 0000000000000000
10 # CHECK-NEXT: 6 reloc.CODE 0000000f 0000000000000000
1111
1212 # RUN: llvm-objdump -p %p/Inputs/trivial.obj.wasm | FileCheck %s -check-prefix CHECK-HEADER
1313
1717 # RUN: llvm-objdump -s --section=CODE %p/Inputs/trivial.obj.wasm | FileCheck %s -check-prefix CHECK-SECTIONS
1818
1919 # CHECK-SECTIONS: Contents of section CODE:
20 # CHECK-SECTIONS: 0000 01170041 80808080 00108080 8080001a ...A............
21 # CHECK-SECTIONS: 0010 10818080 80004100 0b ......A..
20 # CHECK-SECTIONS: 0000 02170041 80808080 00108080 8080001a ...A............
21 # CHECK-SECTIONS: 0010 10838080 80004100 0b0a0041 00108180 ......A....A....
22 # CHECK-SECTIONS: 0020 8080000b ....
2121 RUN: llvm-readobj -x 1 %p/Inputs/trivial.obj.wasm \
2222 RUN: | FileCheck %s --check-prefix WASM
2323
24 WASM: 0x00000000 03600001 7f60017f 017f6001 7f00 .`...`....`...
24 WASM: 0x00000000 04600001 7f60017f 017f6000 0060017f .`...`....`..`..
25 WASM: 0x00000010 00 .
301301 WASM-NEXT: Relocation {
302302 WASM-NEXT: Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB (0)
303303 WASM-NEXT: Offset: 0x11
304 WASM-NEXT: Symbol: .LSomeOtherFunction_bitcast
305 WASM-NEXT: }
306 WASM-NEXT: Relocation {
307 WASM-NEXT: Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB (0)
308 WASM-NEXT: Offset: 0x1E
304309 WASM-NEXT: Symbol: SomeOtherFunction
305310 WASM-NEXT: }
306311 WASM-NEXT: }
495495 WASM: Sections [
496496 WASM-NEXT: Section {
497497 WASM-NEXT: Type: TYPE (0x1)
498 WASM-NEXT: Size: 14
498 WASM-NEXT: Size: 17
499499 WASM-NEXT: Offset: 8
500500 WASM-NEXT: }
501501 WASM-NEXT: Section {
502502 WASM-NEXT: Type: IMPORT (0x2)
503503 WASM-NEXT: Size: 93
504 WASM-NEXT: Offset: 28
504 WASM-NEXT: Offset: 31
505505 WASM-NEXT: }
506506 WASM-NEXT: Section {
507507 WASM-NEXT: Type: FUNCTION (0x3)
508 WASM-NEXT: Size: 2
509 WASM-NEXT: Offset: 127
508 WASM-NEXT: Size: 3
509 WASM-NEXT: Offset: 130
510510 WASM-NEXT: }
511511 WASM-NEXT: Section {
512512 WASM-NEXT: Type: CODE (0xA)
513 WASM-NEXT: Size: 25
514 WASM-NEXT: Offset: 135
513 WASM-NEXT: Size: 36
514 WASM-NEXT: Offset: 139
515515 WASM-NEXT: }
516516 WASM-NEXT: Section {
517517 WASM-NEXT: Type: DATA (0xB)
518518 WASM-NEXT: Size: 19
519 WASM-NEXT: Offset: 166
519 WASM-NEXT: Offset: 181
520520 WASM-NEXT: Segments [
521521 WASM-NEXT: Segment {
522522 WASM-NEXT: Name: .rodata..L.str
527527 WASM-NEXT: }
528528 WASM-NEXT: Section {
529529 WASM-NEXT: Type: CUSTOM (0x0)
530 WASM-NEXT: Size: 61
531 WASM-NEXT: Offset: 191
530 WASM-NEXT: Size: 89
531 WASM-NEXT: Offset: 206
532532 WASM-NEXT: Name: linking
533533 WASM-NEXT: }
534534 WASM-NEXT: Section {
535535 WASM-NEXT: Type: CUSTOM (0x0)
536 WASM-NEXT: Size: 12
537 WASM-NEXT: Offset: 266
536 WASM-NEXT: Size: 15
537 WASM-NEXT: Offset: 309
538538 WASM-NEXT: Name: reloc.CODE
539539 WASM-NEXT: }
540540 WASM-NEXT: ]
8787 WASM-NEXT: Flags: 0x10
8888 WASM-NEXT: }
8989 WASM-NEXT: Symbol {
90 WASM-NEXT: Name: .LSomeOtherFunction_bitcast
91 WASM-NEXT: Type: FUNCTION (0x0)
92 WASM-NEXT: Flags: 0x2
93 WASM-NEXT: }
94 WASM-NEXT: Symbol {
9095 WASM-NEXT: Name: SomeOtherFunction
9196 WASM-NEXT: Type: FUNCTION (0x0)
9297 WASM-NEXT: Flags: 0x10