OLD | NEW |
1 ; RUN: pnacl-llc -mtriple=i386-unknown-nacl -filetype=asm %s -o - \ | 1 ; RUN: pnacl-llc -mtriple=i386-unknown-nacl -filetype=asm %s -o - \ |
2 ; RUN: | FileCheck %s --check-prefix=X86 | 2 ; RUN: | FileCheck %s --check-prefix=X86 |
3 ; Test that @llvm.nacl.{set|long}jmp intrinsics calls get translated to library | 3 ; Test that @llvm.nacl.{set|long}jmp intrinsics calls get translated to library |
4 ; calls as expected. | 4 ; calls as expected. |
5 | 5 |
6 declare i32 @llvm.nacl.setjmp(i8*) | 6 declare i32 @llvm.nacl.setjmp(i8*) |
7 declare void @llvm.nacl.longjmp(i8*, i32) | 7 declare void @llvm.nacl.longjmp(i8*, i32) |
8 | 8 |
9 define void @foo(i8* %arg) { | 9 define void @foo(i8* %arg) { |
10 %num = call i32 @llvm.nacl.setjmp(i8* %arg) | 10 %num = call i32 @llvm.nacl.setjmp(i8* %arg) |
11 ; X86: naclcall setjmp | 11 ; X86: calll setjmp |
12 | 12 |
13 call void @llvm.nacl.longjmp(i8* %arg, i32 %num) | 13 call void @llvm.nacl.longjmp(i8* %arg, i32 %num) |
14 ; X86: naclcall longjmp | 14 ; X86: calll longjmp |
15 | 15 |
16 ret void | 16 ret void |
17 } | 17 } |
18 | 18 |
OLD | NEW |