Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: test/NaCl/ARM/stack-change-sandboxing.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/NaCl/ARM/sp-arithmetic-sandboxing1.ll ('k') | test/NaCl/ARM/vstr-sandboxing1.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/NaCl/ARM/stack-change-sandboxing.ll
diff --git a/test/NaCl/ARM/stack-change-sandboxing.ll b/test/NaCl/ARM/stack-change-sandboxing.ll
new file mode 100644
index 0000000000000000000000000000000000000000..264dd60253d0b1679659ba5e68d9a3048f58b3a2
--- /dev/null
+++ b/test/NaCl/ARM/stack-change-sandboxing.ll
@@ -0,0 +1,34 @@
+; RUN: pnacl-llc -mtriple=armv7-unknown-nacl -filetype=obj %s -o - \
+; RUN: | llvm-objdump -disassemble -triple armv7 - | FileCheck %s
+
+define i32 @foo(i32 %aa, i32 %bb) nounwind {
+entry:
+
+; CHECK: sub sp, sp, #16
+; CHECK-NEXT: bic sp, sp, #3221225472
+
+ %aa.addr = alloca i32, align 4
+ %bb.addr = alloca i32, align 4
+ %cc = alloca i32, align 4
+ %dd = alloca i32, align 4
+ store i32 %aa, i32* %aa.addr, align 4
+ store i32 %bb, i32* %bb.addr, align 4
+ %0 = load i32* %aa.addr, align 4
+ %1 = load i32* %bb.addr, align 4
+ %mul = mul nsw i32 %0, %1
+ store i32 %mul, i32* %cc, align 4
+ %2 = load i32* %aa.addr, align 4
+ %mul1 = mul nsw i32 %2, 17
+ %3 = load i32* %cc, align 4
+ %sub = sub nsw i32 %mul1, %3
+ store i32 %sub, i32* %dd, align 4
+ %4 = load i32* %dd, align 4
+ ret i32 %4
+
+; The nop here is to prevent add/bic to straddle a bundle boundary
+; CHECK: nop
+; CHECK-NEXT: add sp, sp, #16
+; CHECK-NEXT: bic sp, sp, #3221225472
+
+}
+
« no previous file with comments | « test/NaCl/ARM/sp-arithmetic-sandboxing1.ll ('k') | test/NaCl/ARM/vstr-sandboxing1.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698