• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Tests the integrated assembler for instructions with a reloc + offset.
2
3; RUN: %if --need=target_X8632 --need=allow_dump \
4; RUN:   --command %p2i --target x8632 -i %s --args -O2 \
5; RUN:   | %if --need=target_X8632 --need=allow_dump --command FileCheck %s
6
7@p_global_char = internal global [8 x i8] zeroinitializer, align 8
8
9define internal void @reloc_in_global(i64 %x) {
10entry:
11  %p_global_char.bc = bitcast [8 x i8]* @p_global_char to i64*
12  ; This 64-bit load is split into an i32 store to [p_global_char]
13  ; and an i32 store to [p_global_char + 4] on 32-bit architectures.
14  store i64 %x, i64* %p_global_char.bc, align 1
15  ret void
16}
17; CHECK-LABEL: reloc_in_global
18; CHECK: .long p_global_char + 4
19