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

Unified Diff: tests_lit/llvm2ice_tests/function_aligned.ll

Issue 515993002: Align function starts to target-specific bundle alignment. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: uint8_t Created 6 years, 4 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 | « tests_lit/lit.cfg ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/function_aligned.ll
diff --git a/tests_lit/llvm2ice_tests/function_aligned.ll b/tests_lit/llvm2ice_tests/function_aligned.ll
new file mode 100644
index 0000000000000000000000000000000000000000..fcb4699b014b9cb52b205acbe0dafa0a4745e783
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/function_aligned.ll
@@ -0,0 +1,21 @@
+; Test that functions are aligned to the NaCl bundle alignment.
+; We could be smarter and only do this for indirect call targets
+; but typically you want to align functions anyway.
+; Also, we are currently using hlts for non-executable padding.
+
+; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
+; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
+
+define void @foo() {
+ ret void
+}
+; CHECK-LABEL: foo
+; CHECK-NEXT: 0: {{.*}} ret
+; CHECK-NEXT: 1: {{.*}} hlt
+
+define void @bar() {
+ ret void
+}
+; CHECK-LABEL: bar
+; CHECK-NEXT: 20: {{.*}} ret
« no previous file with comments | « tests_lit/lit.cfg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698