• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s | FileCheck %s
2target datalayout = "e-m:e-i64:64-n32:64"
3target triple = "powerpc64le-unknown-linux-gnu"
4
5@_ZTIi = external constant i8*
6declare i8* @__cxa_allocate_exception(i64)
7declare void @__cxa_throw(i8*, i8*, i8*)
8
9define void @crsave() {
10entry:
11  call void asm sideeffect "", "~{cr2}"()
12  call void asm sideeffect "", "~{cr3}"()
13  call void asm sideeffect "", "~{cr4}"()
14
15  %exception = call i8* @__cxa_allocate_exception(i64 4)
16  %0 = bitcast i8* %exception to i32*
17  store i32 0, i32* %0
18  call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
19  unreachable
20
21return:                                           ; No predecessors!
22  ret void
23}
24; CHECK-LABEL: @crsave
25; CHECK: .cfi_offset cr2, 8
26; CHECK: .cfi_offset cr3, 8
27; CHECK: .cfi_offset cr4, 8
28
29