Aleksandar Beserminji | a594943 | 2018-10-16 08:27:28 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=mips-linux-gnu -mcpu=mips32r2 -mattr=+micromips -O3 -filetype=obj < %s | llvm-objdump -s -j .gcc_except_table - | FileCheck %s |
| 2 | |
| 3 | ; CHECK: Contents of section .gcc_except_table: |
| 4 | ; CHECK-NEXT: 0000 ff9b1501 0c011100 00110e1f 011f1800 |
| 5 | ; CHECK-NEXT: 0010 00010000 00000000 |
| 6 | |
| 7 | @_ZTIi = external constant i8* |
| 8 | |
| 9 | define dso_local i32 @main() local_unnamed_addr norecurse personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { |
| 10 | entry: |
| 11 | %exception.i = tail call i8* @__cxa_allocate_exception(i32 4) nounwind |
| 12 | %0 = bitcast i8* %exception.i to i32* |
| 13 | store i32 5, i32* %0, align 16 |
| 14 | invoke void @__cxa_throw(i8* %exception.i, i8* bitcast (i8** @_ZTIi to i8*), i8* null) noreturn |
| 15 | to label %.noexc unwind label %return |
| 16 | |
| 17 | .noexc: |
| 18 | unreachable |
| 19 | |
| 20 | return: |
| 21 | %1 = landingpad { i8*, i32 } |
| 22 | catch i8* null |
| 23 | %2 = extractvalue { i8*, i32 } %1, 0 |
| 24 | %3 = tail call i8* @__cxa_begin_catch(i8* %2) nounwind |
| 25 | tail call void @__cxa_end_catch() |
| 26 | ret i32 0 |
| 27 | } |
| 28 | |
| 29 | declare i32 @__gxx_personality_v0(...) |
| 30 | |
| 31 | declare i8* @__cxa_begin_catch(i8*) local_unnamed_addr |
| 32 | |
| 33 | declare void @__cxa_end_catch() local_unnamed_addr |
| 34 | |
| 35 | declare i8* @__cxa_allocate_exception(i32) local_unnamed_addr |
| 36 | |
| 37 | declare void @__cxa_throw(i8*, i8*, i8*) local_unnamed_addr |