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

Unified Diff: tests_lit/llvm2ice_tests/ias-data-reloc.ll

Issue 1241313002: Fix --filetype=iasm non-pc-rel fixup offsets (double counted). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 5 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
« src/IceELFSection.h ('K') | « src/IceFixups.cpp ('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/ias-data-reloc.ll
diff --git a/tests_lit/llvm2ice_tests/ias-data-reloc.ll b/tests_lit/llvm2ice_tests/ias-data-reloc.ll
new file mode 100644
index 0000000000000000000000000000000000000000..d265d40a6f975d7dbfa0a1e100e1a23c23451de9
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/ias-data-reloc.ll
@@ -0,0 +1,18 @@
+; Tests the integrated assembler for instructions with a reloc + offset.
+
+; RUN: %if --need=target_X8632 --need=allow_dump \
+; RUN: --command %p2i --target x8632 -i %s --args -O2 \
+; RUN: | %if --need=target_X8632 --need=allow_dump --command FileCheck %s
+
+@p_global_char = internal global [8 x i8] zeroinitializer, align 8
+
+define internal void @reloc_in_global(i64 %x) {
+entry:
+ %p_global_char.bc = bitcast [8 x i8]* @p_global_char to i64*
+ ; This 64-bit load is split into an i32 store to [p_global_char]
+ ; and an i32 store to [p_global_char + 4] on 32-bit architectures.
+ store i64 %x, i64* %p_global_char.bc, align 1
+ ret void
+}
+; CHECK-LABEL: reloc_in_global
+; CHECK: .long p_global_char + 4
« src/IceELFSection.h ('K') | « src/IceFixups.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698