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

Side by Side Diff: test/NaCl/X86/negative-addend.ll

Issue 18261008: PNaCl: Fix negative relocation addends on x86-32 (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Created 7 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 unified diff | Download patch
« no previous file with comments | « test/NaCl/ARM/negative-addend.ll ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; RUN: pnacl-llc -mtriple=i386-unknown-nacl -filetype=obj %s -o - \
2 ; RUN: | llvm-objdump -r - | FileCheck %s -check-prefix=X8632
3 ; RUN: pnacl-llc -mtriple=x86_64-unknown-nacl -filetype=obj %s -o - \
4 ; RUN: | llvm-objdump -r - | FileCheck %s -check-prefix=X8664
5
6 ; Check that "add" works for negative values when used as a
7 ; ConstantExpr in a global variable initializer.
8 ; See: https://code.google.com/p/nativeclient/issues/detail?id=3548
9
10
11 ; @spacer and @var end up in the BSS section.
12 ; @spacer is at offset 0. @var is at offset 4096 = 0x1000.
13
14 @spacer = internal global [4096 x i8] zeroinitializer
15 @var = internal global i32 zeroinitializer
16
17 @negative_offset = internal global i32 add
18 (i32 ptrtoint (i32* @var to i32), i32 -8)
19
20 ; Note that the addend 4294971384 below equals 0x100000ff8, where
21 ; 0xff8 comes from subtracting 8 from the offset of @var.
22
23 ; X8632: RELOCATION RECORDS FOR [.data]:
24 ; X8632-NEXT: 0 R_386_32 Unknown
25
26 ; X8664: RELOCATION RECORDS FOR [.data]:
27 ; X8664-NEXT: 0 R_X86_64_32 .bss+4294971384
OLDNEW
« no previous file with comments | « test/NaCl/ARM/negative-addend.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698