1 # RUN: llvm-mc -no-type-check -triple=wasm32-unknown-unknown -mattr=+exception-handling < %s | FileCheck %s
3 # Tests if block/loop/try/catch/end/branch/rethrow instructions are correctly
4 # printed with their annotations.
7 .section .text.test_annotation,"",@
8 .type test_annotation,@function
10 .functype test_annotation () -> ()
11 .tagtype __cpp_exception i32
39 # CHECK: test_annotation:
41 # CHECK-NEXT: br 0 # 0: down to label0
42 # CHECK-NEXT: catch __cpp_exception # catch0:
44 # CHECK-NEXT: br_if 0 # 0: down to label1
45 # CHECK-NEXT: loop # label2:
46 # CHECK-NEXT: br_if 1 # 1: down to label1
47 # CHECK-NEXT: end_loop
48 # CHECK-NEXT: end_block # label1:
50 # CHECK-NEXT: rethrow 0 # down to catch3
51 # CHECK-NEXT: catch __cpp_exception # catch3:
52 # CHECK-NEXT: catch_all{{$}}
55 # CHECK-NEXT: br 0 # 0: down to label5
57 # CHECK-NEXT: delegate 1 # label/catch6: down to catch4
58 # CHECK-NEXT: catch_all # catch5:
59 # CHECK-NEXT: end_try # label5:
60 # CHECK-NEXT: end_block # label4:
61 # CHECK-NEXT: rethrow 0 # to caller
62 # CHECK-NEXT: end_try # label3:
63 # CHECK-NEXT: end_try # label0:
64 # CHECK-NEXT: end_function