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

Unified Diff: test/NaCl/ARM/negative-addend.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/nacl-setlongjmp-intrinsics.ll ('k') | test/NaCl/ARM/neon-vld1-sandboxing.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/NaCl/ARM/negative-addend.ll
diff --git a/test/NaCl/ARM/negative-addend.ll b/test/NaCl/ARM/negative-addend.ll
new file mode 100644
index 0000000000000000000000000000000000000000..314461aef89e71804bc6222532683caa1034edc9
--- /dev/null
+++ b/test/NaCl/ARM/negative-addend.ll
@@ -0,0 +1,19 @@
+; RUN: pnacl-llc -mtriple=arm-unknown-nacl -filetype=obj %s -o - \
+; RUN: | llvm-objdump -r - | FileCheck %s -check-prefix=ARM
+
+; Check that "add" works for negative values when used as a
+; ConstantExpr in a global variable initializer.
+; See: https://code.google.com/p/nativeclient/issues/detail?id=3548
+
+
+; @spacer and @var end up in the BSS section.
+; @spacer is at offset 0. @var is at offset 4096 = 0x1000.
+
+@spacer = internal global [4096 x i8] zeroinitializer
+@var = internal global i32 zeroinitializer
+
+@negative_offset = internal global i32 add
+ (i32 ptrtoint (i32* @var to i32), i32 -8)
+
+; ARM: RELOCATION RECORDS
+; ARM-NEXT: 0 R_ARM_ABS32 .bss
« no previous file with comments | « test/NaCl/ARM/nacl-setlongjmp-intrinsics.ll ('k') | test/NaCl/ARM/neon-vld1-sandboxing.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698