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

Unified Diff: test/NaCl/X86/pnacl-hides-sandbox-x86-64.c

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/X86/pnacl-avoids-r11-x86-64.ll ('k') | test/NaCl/X86/pnacl-hides-sandbox-x86-64.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/NaCl/X86/pnacl-hides-sandbox-x86-64.c
diff --git a/test/NaCl/X86/pnacl-hides-sandbox-x86-64.c b/test/NaCl/X86/pnacl-hides-sandbox-x86-64.c
new file mode 100644
index 0000000000000000000000000000000000000000..e3ffba0baf66c8b98c3d82155cf7898982ead7fc
--- /dev/null
+++ b/test/NaCl/X86/pnacl-hides-sandbox-x86-64.c
@@ -0,0 +1,54 @@
+/*
+ Object file built using:
+ pnacl-clang -S -O0 -emit-llvm -o pnacl-hides-sandbox-x86-64.ll \
+ pnacl-hides-sandbox-x86-64.c
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+void TestDirectCall(void) {
+ extern void DirectCallTarget(void);
+ DirectCallTarget();
+}
+
+void TestIndirectCall(void) {
+ extern void (*IndirectCallTarget)(void);
+ IndirectCallTarget();
+}
+
+void TestMaskedFramePointer(int Arg) {
+ extern void Consume(void *);
+ // Calling alloca() is one way to force the rbp frame pointer.
+ void *Tmp = alloca(Arg);
+ Consume(Tmp);
+}
+
+void TestMaskedFramePointerVarargs(int Arg, ...) {
+ extern void Consume(void *);
+ void *Tmp = alloca(Arg);
+ Consume(Tmp);
+}
+
+void TestIndirectJump(int Arg) {
+ switch (Arg) {
+ case 2:
+ puts("Prime 1");
+ break;
+ case 3:
+ puts("Prime 2");
+ break;
+ case 5:
+ puts("Prime 3");
+ break;
+ case 7:
+ puts("Prime 4");
+ break;
+ case 11:
+ puts("Prime 5");
+ break;
+ }
+}
+
+void TestReturn(void) {
+}
« no previous file with comments | « test/NaCl/X86/pnacl-avoids-r11-x86-64.ll ('k') | test/NaCl/X86/pnacl-hides-sandbox-x86-64.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698