• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: sparc
2# RUN: llvm-mc -filetype=obj -triple=sparcv9 %s -o %t.o
3# RUN: ld.lld %t.o -o %t
4# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=LE %s
5
6## %hix(@tpoff(a)) = ~(st_value(a) - 1026) >> 10 = 1
7## %lo(@tpoff(a)) = (st_value(a) - 1026) & 0x3ff | 0x1c00 = -2 (0x1ffe)
8# LE:      sethi 1, %o0
9# LE-NEXT: xor %o0, -2, %o0
10sethi %tle_hix22(a), %o0
11xor   %o0, %tle_lox10(a), %o0
12
13.section .tbss
14  .globl a
15a:
16  .zero 1024+2
17b:
18