Index: test/CodeGen/X86/frameaddr.ll |
diff --git a/test/CodeGen/X86/frameaddr.ll b/test/CodeGen/X86/frameaddr.ll |
index 452c8e5a21af9cfc22944e6bb0b2f82796269358..38ad46a11b9e6f67e812fc194ac6e529e141586d 100644 |
--- a/test/CodeGen/X86/frameaddr.ll |
+++ b/test/CodeGen/X86/frameaddr.ll |
@@ -4,6 +4,8 @@ |
; RUN: llc < %s -march=x86-64 -fast-isel -fast-isel-abort | FileCheck %s --check-prefix=CHECK-64 |
; RUN: llc < %s -mtriple=x86_64-gnux32 | FileCheck %s --check-prefix=CHECK-X32ABI |
; RUN: llc < %s -mtriple=x86_64-gnux32 -fast-isel -fast-isel-abort | FileCheck %s --check-prefix=CHECK-X32ABI |
+; RUN: llc < %s -mtriple=x86_64-nacl | FileCheck %s --check-prefix=CHECK-NACL64 |
+; RUN: llc < %s -mtriple=x86_64-nacl -fast-isel -fast-isel-abort | FileCheck %s --check-prefix=CHECK-NACL64 |
define i8* @test1() nounwind { |
entry: |
@@ -25,6 +27,11 @@ entry: |
; CHECK-X32ABI-NEXT: movl %ebp, %eax |
; CHECK-X32ABI-NEXT: popq %rbp |
; CHECK-X32ABI-NEXT: ret |
+; CHECK-NACL64-LABEL: test1 |
+; CHECK-NACL64: movl %ebp, %eax |
+; CHECK-NACL64-NEXT: pushq %rax |
+; CHECK-NACL64-NEXT: movq %rsp, %rbp |
+; CHECK-NACL64-NEXT: movl %ebp, %eax |
%0 = tail call i8* @llvm.frameaddress(i32 0) |
ret i8* %0 |
} |
@@ -52,6 +59,14 @@ entry: |
; CHECK-X32ABI-NEXT: movl (%eax), %eax |
; CHECK-X32ABI-NEXT: popq %rbp |
; CHECK-X32ABI-NEXT: ret |
+; CHECK-NACL64-LABEL: test2 |
+; CHECK-NACL64: movl %ebp, %eax |
+; CHECK-NACL64-NEXT: pushq %rax |
+; CHECK-NACL64-NEXT: movq %rsp, %rbp |
+; -fast-isel and -O2 are a bit different in how they load from rbp |
+; (we can use NACL64-NEXT if we ever make the sequences the same). |
+; CHECK-NACL64: movl {{.*}}(%{{.*}}), %eax |
+; CHECK-NACL64-NEXT: movl %nacl:(%r15,%rax), %eax |
%0 = tail call i8* @llvm.frameaddress(i32 2) |
ret i8* %0 |
} |