Jim Grosbach | 0f448b5 | 2010-10-08 00:47:59 +0000 | [diff] [blame] | 1 | ;RUN: llc -mtriple=armv7-apple-darwin -show-mc-encoding < %s | FileCheck %s |
| 2 | |
| 3 | |
| 4 | ;FIXME: Once the ARM integrated assembler is up and going, these sorts of tests |
| 5 | ; should run on .s source files rather than using llc to generate the |
| 6 | ; assembly. |
| 7 | |
| 8 | define i32 @foo(i32 %a, i32 %b) nounwind ssp { |
| 9 | entry: |
| 10 | ; CHECK: foo |
| 11 | ; CHECK: 0xf0,0x00,0xf0,0x07 |
Jim Grosbach | 56ac907 | 2010-10-08 21:45:55 +0000 | [diff] [blame^] | 12 | ; CHECK: 0x1e,0xff,0x2f,0xe1 |
Jim Grosbach | 0f448b5 | 2010-10-08 00:47:59 +0000 | [diff] [blame] | 13 | |
| 14 | tail call void @llvm.trap() |
| 15 | ret i32 undef |
| 16 | } |
| 17 | |
Jim Grosbach | 56ac907 | 2010-10-08 21:45:55 +0000 | [diff] [blame^] | 18 | define i32 @f2(i32 %a, i32 %b) nounwind readnone ssp { |
| 19 | entry: |
| 20 | ; CHECK: f2 |
| 21 | ; CHECK: 0x00,0x00,0x81,0xe0 |
| 22 | ; CHECK: 0x1e,0xff,0x2f,0xe1 |
| 23 | %add = add nsw i32 %b, %a |
| 24 | ret i32 %add |
| 25 | } |
Jim Grosbach | 0f448b5 | 2010-10-08 00:47:59 +0000 | [diff] [blame] | 26 | declare void @llvm.trap() nounwind |